As domain names are international and ran by the Internet Corporation for Assigned Names and Numbers, the trademark part does not always come into effect. Cyber squatting can still occur without a U.S. Trademark.
If a company is somename and you own somename.com they have the option to dispute that with ICANN. https://www.icann.org/resources/pages/dndr-2012-02-25-en#udrp
ICANN is going to look at the way you use the domain name. They won't allow you to simply own the name to charge the real company a lot of money, run a scam, or use it only for bad things.
However, if you have a reasonable use for somename.com, like it is also the name of a club you belong to or something, ICANN would likely let you keep it.
As for the trademark part, the company would have to sue you for using their trademark if you infringed on it in court if they wanted to pursue the matter. That would be separate from the cyber squatting issue and if you lost you would most likely be ordered to compensate the company financially.