How exactly are pedals attached to crank arms? Recently I tried to unscrew the left pedal of a bicycle by turning it counter-clockwise with a spanner lengthened with a piece of pipe. The net result is the spanner broke apart and the pedal is still there.

This makes me wonder.

Is that just threaded joint or is there something else besides threading? Is the threading left-handed or right handed? Do I need anything else except what I would normally use to unscrew a threaded joint?
Like Daniel Hicks says, they are threaded opposite to each other. This ensures the act of you pedaling is constantly tightening them both. If they were both the usual right hand threads then the left pedal would eventually unscrew and fall off.

So, if you're like me and use the right hand rule to constantly assess which direction you should be turning things to make them move in the direction you want, you'll now need to switch to the "left hand rule" for the left hand pedal.