Your internet IP address is usually logged/recorded every time you login or post something. If authorities get a hold of your IP address they can trace it to your internet provider. This internet provider will usually give your information out if the proper process has been followed.

Skillful 'hacking' could also allow someone to extract this information.