I've researched a bit about the use of these prepositions, but 99% of what I found refer to the use with time and place, but that's not what I need. I've read once that 'on' is used when you're 'on top' of something and 'in' when you're 'inside of something', but that doesn't apply to everything, take this phrase for example: I work in/on/at a company.
What would be the correct word in(is this the correct one?) this case? Why? Is there a rule of when to use each one?
My native language is Brazilian portuguese.