I own a 1989 Pontiac Grand Am with 86,000 miles that was a gift from my mother. She has already had the head gasket done which I understand is a big problem on the Quad-4 engines. Now, the engine runs rough when I'm sitting at a stop light idling, but it's OK once I'm moving, and the problem seems to disappear when the transmission is in park. My mom said it ran really badly when the head gasket blew out the first time. Is this the beginning of the head gasket problem again?
I don't think it's a replay of the Quad-4 head gasket routine. The new gaskets usually hold up better than the originals as long as the cylinder head was in good shape at the time of replacement. You would also be seeing and smelling the vaporized antifreeze coming out of the tailpipe. But let me tell you something, between head gaskets and timing chains these engines spend a lot of time in the shop.
It definitely sounds like you have a bad motor mount on your hands, seeing that you're only feeling it at idle. How does a motor mount make the engine run bad? Actually it doesn't. The engine is running fine, but the normal engine vibrations are being transmitted directly to the chassis through the mount.
The problem is that over time the motor mount gets compacted and becomes hard as a rock. This causes it to lose its cushioning ability and makes your Grand Am seem like a race car with "solid motor mounts" rumbling down the track. When replacing mounts on these cars, I often put the new one next to the old one where you can see how the original is now about an inch shorter.
The reason it feels much smoother when the transmission is in park or neutral is because the engine is free-floating. When placing the transmission in drive you are pinning it toward the rear and onto the rear (technically the right) engine mount. Try placing the transmission in reverse and see how it feels. If it's OK then the front (left) engine mount is OK. If reverse also gives you that harsh vibration than you may need to replace both mounts.