If grammar is not your strong point, pay attention to this tip: If the word is accentuated there is a gap in the pronunciation. If it is not, there is not.
Comoella se compró un caballo, yo me compré un perro. Asshe bought a horse, I bought a dog. NOTE THAT THERE IS NO GAP BETWEEN COMO AND ELLA.
No entiendo cómo ella se compró un caballo. I don´t understand how she bought a horse. NOTE THAT THERE IS A GAP BETWEEN COMO AND ELLA. Also the pronunciation of “Cómo” and “How” is stressed.
This is also a good tip also for Spanish speaking people.