Do you already have the pedal arm off ? If not, you have to remove the cotter (square bolt) out 1st. To start take off both nuts from each cotter. Then, put both nuts on the cotter you're trying to take off. Dont tighten them all the way down, just enough so you can get both of them on. Tighten them to EACH OTHER. This will help save the threads on the cotter, in case you need to re-use them.Make sure you leave enough room for the cotter to slide loose. Hose the crank arm with lots of wd-40,from all sides, soak awhile, repeat.
Then, take a good hammer, and hit the cotter a couple of good ones. It should pop out slightly. Remove one of the nuts, spin the other one to the tip of the threads, tap it out some more. It should be loose enough now to take the nut all the way off, grab the head with vice grips and remove. If the pedal arm is still stuck, heat it up with a torch slightly, and tag it with the hammer back and forth until the rust bond breaks.
That should do ya.
Rick