They need to go and get a court order, and with that they request the personal data from the respective ISP. The whole process is pretty steamlined and partly automated though.
Source: have been through many copyright claims and currently have a supreme court lawsuit pending.