Quick answer
este = near me, the speaker.
ese = near you, the listener.
aquel = far from both of us, often out of reach or further back in time.
They agree in gender and number: este/esta/estos/estas, ese/esa/esos/esas, aquel/aquella/aquellos/aquellas.
Side by side
Memory trick
Three zones, not two: my space, your space, nobody's space. If the object is closer to your listener than to you, it is ese, no matter how near it feels.
Typical mistakes
Este libro que tienes en la mano es interesante.
Ese libro que tienes en la mano es interesante.
The book is in the listener's hand, so it sits in their zone. English "this" tempts you into este, but Spanish tracks who is holding it.
Este casa es grande.
Esta casa es grande.
Casa is feminine, so the demonstrative has to be esta. The forms agree like adjectives.
Check yourself
Your friend is holding a shirt. You say: "___ camisa te queda bien."