Let's say someone has an agreement with me about X.

Under what conditions would this agreement be a legally binding and enforceable contract?

Every definition I find online says that it's a contract if it's "legally binding and enforceable", but that's utterly unhelpful and begs the question of what constitutes legal bind and enforceability.