A covenant not to compete is often called a non-compete agreement, and it is a written, signed contract, usually between an employer and an employee — it can be between an independent contractor and a business or a buyer and a seller — in which a person is agreeing that they will not engage in a particular field of business within a specific geographic area for a certain period of time.
It’s designed to protect the business’s legitimate business interest, that is, from unfair competition. It is often signed in the employer/employee relationship where somebody has developed relationships with customers, etc. It’s designed for that. It is enforceable.