There are numerous ways the IRS can find out about offshore accounts. Some of the most common are foreign financial institutions sharing information about US account holders to the IRS via FATCA and FBAR filings made to FINCEN.