Both are correct.
The first form ("¿Quiere comer algo?") is used with unknown people, or as a respectful form with elders. It is assumed you are talking to 'usted':
"¿Quiere usted comer algo?"
The second one ("¿Quieres comer algo?") is for friends, used as a casual form. Here you're talking to 'tú':
"¿Quieres tú comer algo?" (although is very unusual to say it using 'tú')