Sayyiduna Tariq bin Abdullah Muharibi (may Allah be pleased with him) reports that the Messenger of Allah (peace and blessings be upon him) said: "When you spit during prayer, spit to your left side or under your left foot."
Related hadith on this topic