It is a legal contract between the owner of the property and the person who wishes to rent it for a given period of time. It usually specifies the name, purpose of staying, Aadhar or other government identification and permanent address of the renter.
This also specifies how much rent you will be paying each month which prevents both you as well as the owner against any cheating.

Example:
Students who come to study in far away universities usually rent flats or PGs to stay in for which they have to sign a document for possessing the room and this document is called rent agreement.