I have a domain, hosting and email with Godaddy. I want to keep the email with godaddy and hosting to a different server?

So which records should I edit? CNAME or A?

I edited the A record to point to the hosting server IP and all emails are received on the hosting server. So Can you guys direct me to the correct way to do this?