In general, encapsulation of fields by getters and setters leaves more flexibility for changes.
If fields are accessed directly you are stuck with "stupid fields". Fields can only be written and read. Nothing else can be done while accessing a field.
When using methods you can do whatever you want while setting / reading the value. As markus and Jigar mentioned, validation is possible. In addition, you could decide some day that the value is derived from another value or some actions must be executed if the value changes.
how come data is hidden or safe
Data is neither hidden nor safe by using getters and setters. It just gives you the possibility to make it safe. What is hidden is the implementation and not the data.