I can start my car but I go to stift it in any gear my car quits on me. What could be the possible problem.
Try a tune up.
If one makea a wild guess at the type of vehicle in question being a late model Crown Vic based on your ID then the most likely cause is a dirty or faulty Idle Air Valve.
The possible problem could be intake passages are partially blocked, by oil film and carbon brought into the intake by the pcv valve. Use a MAF (Mass Air Flow) spray cleaner, and a carb/throttle body spray cleaner on the iac (idle air control) valve pintle and passage, and the throttle plate and bore. It’s easy. Just take off the large black plastic intake tube and use the spray cleaners as their directions direct.
Idle Air Valve, as OK4450 said. Relatively common on Crown Vics.