Answer by Japanese teacher
In the first expression, the word 話(はな)せます hanasemasu comes from “話(はな)す hanasu” (to speak). In the second expression, わかります wakarimasu means “to understand”. Both expressions can be used to mean “do you speak English”. It would be good to add すみません sumimasen (excuse me) in front of both expressions to be polite.