I've been having a bit of an introduction to how the police and the courts, reverse-out an IP address and resolve it to a person's identity. It's really quite fascinating.
As long as a visitor to a website(s) or a chatroom has left a trail of breadcrumbs in the shape of a date, time and IP address, dynamic or otherwise, this history can be matched up, as the first part of IP address identifies the Internet Service Provider (ISP) and the remainder, the account holder at that moment in time. Of course, it's a little more complex than this but close.
Once this information has been gleaned, then the next stage is an application for a court-order, normally uncontested by the ISP, given the recent changes in the laws governing electronic communications. The next step only takes a few minutes as the times and addresses are matched, a bit like CSI New York and with a bit of "mash-up" technology with Google Maps, you've got the location and even a satellite photo of the person's house.
Of course the police and the intelligence services can get this information in minutes. I recall an incident several years ago, when my business was receiving obscene emails into its server-driven chatroom. We involved the Metropolitan Police and waited for the sick individual to re-appear. When he did, it took about ten minutes to ascertain that he was on a computer at Kensington Town Hall (an employee) of all places and a two detectives were duly despatched to collect the suspect.