At least in California AFAIK the law says exactly what the poster above said which is that the company owns work related their area of business even outside work hours and not on company equipment.
I always think of it this way. You're at dinner (ie, off company time). While a dinner you think of a solution for something at work. Do you own that solution? Can you charge the company $$$$$ to sell them this solution you came up with outside company hours?
If yes then there's an incentive for you to never think on company time. If no then it seems pretty clear there's a spectrum from clearly related to the company's area of business to absolutely not related to the company's area of business. If you work at Facebook and on the side you design a new IoT coffee maker that's probably on the unrelated side. If you work at Facebook and on the side make a new social networking site probably on the absolutely related side.
If you want to be safe rather than wait for a court to decide get it in writing. At least when I was at Google they offered that service. You could bring them the idea and they'd tell you if it was related or not and if not give you a signed contract saying they officially had no interest in your outside project.
Yes, and signing this agreement is a condition of employment.