For a contract to be valid and enforceable, it must contain four essential elements: agreement, capacity, consideration and legality. These components ensure that all parties understand their rights and obligations, establishing a solid legal basis for the contractual relationship.