How data is secured with encapsulation?
Data is more secure in the sense that data can be accessed in a safe way - the same way your bank account is secure because it can be accessed in a safe way. In some classes, there are rules for accessing data so that the class is always in a consistent state. These rules can be defined in a method and everyone is forced to comply with these rules by making the data private and the method public. It's like saying
if you want to access this data, you must first comply with these rules. If everyone was allowed to directly access the data without complying with the rules, there is a good chance that the class will be left in an inconsistent state.
Encapsulation also has the advantage that the rules can be modified without having to modify every client.