If they are downloading software or digital data that requires one to pay for a license or have the specific approval of the author/creator (or their designated representative) and they have not paid for a license or do not have the permission, then it is illegal. If they are downloading legal software that they own/paid for or software/digital data that requires no specific license or payment then it is legal. They catch people by linking the content they download with the IP it was downloaded by. If the content meets the illegal definition above, then it is illegal.
For example, downloading OSX via a Torrent is illegal even if you already own a disc/license. Downloading an open source version of Linux is legal.
Your IP is attached to a service somewhere, usually your ISP, and is traceable to a specific geographic location within a few miles of where you are accessing the web. Connecting you with the IP and data and the location is a legal process that requires your ISP to essentially "give you up" either with or without a court order as they choose. In extreme cases the authorities can legally seize your computer and use the records/files stored therein to prove certain activities by you or someone in your household. This extreme requires a court order in almost all cases.
As for the original question, I agree with the above. If you are worried about your IP getting logged then you are probably doing something you shouldn't be. For the record, this forum logs your IP and all IPs that you may use when you log on and they are associated with your username/account. This info is available to the staff and is used monitoring/running the site and keeping Spammers for causing chaos on the boards. Lots of places do and there is an electronic trail of your activities a mile wide all around the web. Of course someone has to want to look at what you are doing for it to be an issue no matter what you do.