what do i need to do if it starts then back fires on 1993 Mazda MX-6

ok my car starts then it sound ok but when i put it to frist gear then it back fires but i let it it here with then engine on for about five to ten minutes its runs fine