Why should I write Getter/Setter?

Why should I write Getter/Setter?
Why should I write Getter/Setter? When I started my career in Java, I was confused about getter and setter. One question always comes to my mind why should I write getter/setter? It looks weird kind of syntax to me. I learned that by public access...