In the days before very high strength alloy materials, pedals were held in place with cotter pins.
This system was more dependable than the modern splined systems, since they'd give plenty of warning of failure and be fixable several times. On the down side, they needed quite a lot more maintenance.
The cotter pin is wedge shapped, with a threaded stem and a nut that pulled them into a wedge-shaped hole.
Cotter pins can be reused, unless they have corroded into their hole, in which case they can be quite difficult to get out. Loosen the nut a bit before reaching for the hammer and hitting it. That way, if you spread the threaded portioin a little bit, you may be lucky and recover the thread and be able get the nut back on. But be careful - if the pin is really stuck, then it's important to take the nut off completely and use a new pin (which you will have handy).
(Note - properly equipped workshops heat the pedal crank in the cases of a stuck pin. This releases most stuck items).
Cotter pins should always be used so that the widest part takes the pressure of the pedal (the thinner end is not really a good tight fit in the hole, and it's not as strong anyway).
The correct use of cotter pins, described above, causes both cotter pins to point in the same direction (ie both pin heads or both nuts seen from the riding position). So the pedals are slightly out of line, one leg pedals slightly ahead of the other. This is why, traditionally, cycle chain wheels are always on the right, unlike motorcycles, which can be either side.
However, this effect may not be noticeable to you, since the later, more advanced production facilities machined the notches in the crank-pin slightly out of line, making this effect near invisible.