does it depend on what they were tracing?
yep
depending on what's going on...it takes a lot of knowledge to do accurate traces of most things...anything you've EVER seen on CSI...is fake...nothing works that way...but it makes for good ratings
since you mentioned the IP part..i'll do a little explaining on that (basic)
an IP address is a numerical address that's assigned to a computer that's on a network (local network like a LAN in your home or public network like the internet)...an IP address is the same as your mailing address...it tells other computers in the network where you are so they can send you information.
with regards to PUBLIC ip addresses, which are the addresses assigned to your internet connection by your ISP (internet service provider) it is unique across the ENTIRE internet (out of all the millions of devices connected to the "public network" you're the ONLY one with your IP address at any given moment)....now ISPs (internet service providers) have records of who's internet account has which IP address at any given point in time..
so let's say you try to hack the government network (if you do this from your home computer without at least trying to mask your IP...then you're an eejit...though...even if you do mask your ip....they can still find you)...the government will have a record of the time that you tried to get in...and they will have a record of the address that you came from...so they will contact your ISP (with a subpoena from a court) to find out who was using that IP at the time of the attack....and then they'll come knocking on your door