A REST API is an
application programming interface (API) that conforms to the design
principles of the representational state transfer (REST) architectural
style.
Every object has some state(data) and behavior(methods). In order to transfer state of object on server at particular instance of time to client, some sort of representation is needed like JSON or XML or any other format.
So REST is about creating representation of object's current state and transferring that representation over network.