Object Oriented Programming is an organizational technique. If you have a User data structure, it might have fields like:
You might have functions that work with Users like,
You could just throw all these things around willy nilly, or you could put all the user-related data and functions in one place - a User class. Maybe that last
addUserToCompany() function belongs more on the Company class than the User class. It's not a perfect system. But you shouldn't have to look for that function anywhere but the User and Company classes, so at least it narrows down where you'd sensibly look for things.
Encapsulation usually means (roughly) "hiding." You hide things to limit the ways they can be used. If something has no moving parts, you're less likely to break it. So you hide all the sensitive stuff - hopefully more effectively than you would by adding a comment like
// Don't touch this!