What I am trying to say is: just before tapping the cotter out, you have to force the crank arm backward. Put force on it in the opposite direction from when you pedal.
Pedaling loose cotters has worn (swaged) a groove into the cotter, and you have to force the crank arm the other way before you can remove it.
Another way to do it besides the one I described is to stand on the pedals. Then, get off the bike without moving the pedals. Then, tap out the cotter from the crank arm that points BACKWARD, but don't move the pedals to a new position, even if you have to hammer from the bottom.
After the first crank arm is off, you will have to hold the crank axle with a wrench while you force the other pedal in the direction of pedaling backwards. Then tap the cotter out. The crank axle has a flat part that you can hold with a wrench.
Of course, if your bike has coaster brakes you may have worn two grooves into your cotters and my trick may not work.
P.S.: anyone who gets loose cotters should try tightening them first. Don't use the nut; tap the cotter in, then tighten the nut.