what causes the exhaust to spit and sputter while it is idleing/
It usually means one or more cylinders are not firing properly or consistently. Look into changing ignition parts to resolve (plugs, wires, rotor, dist cap, etc.). Not as likely but also possible is the fuel delivery if it is an injected engine.
Search Pontiac Grand Am Questions
Are you a UK consumer? CarGurus now has a discussion forum in the UK.
Pontiac Grand Am Experts