Quick answer
qué = asks for a definition or comes straight before a noun.
cuál = asks you to pick out of a set, even when English says "what".
Before a noun Spanish almost always uses qué: ¿qué color?, not ¿cuál color? in Spain.
Side by side
Memory trick
If <i>es</i> follows and you are not asking for a definition, use cuál. If a noun follows, use qué.
Typical mistakes
¿Qué es tu apellido?
¿Cuál es tu apellido?
You are not asking what a surname is in general; you want the specific one out of many. Spanish uses cuál here.
¿Cuál hora es?
¿Qué hora es?
A noun follows, so it has to be qué. This is fixed in every variety of Spanish.
Check yourself
Fill in: "___ es tu dirección de correo?"