Contract is an agreement which is enforceable by law. When one person promises to the other person to do or not to do it’s called contact. It's a promises or set of promises
For example, when you sign a lease to rent an apartment, you're entering into a contract with the landlord.
On the other hand, agreement is not enforceable by law.
For example, x and y two persons are decided that they would bank robbery at night, which is not enforceable by law.