How many methods can enable construction of pile foundations and how?

You can use hammer, press or vibration drivers. The most common are hammer and vibration drivers, which pound on or vibrate the pile to sink it into the ground. Where noise or vibration would be a no-no, press drivers can be employed.

Hammer drivers can be operated mechanically, hydraulically or pneumatically. In all types of hammer driver, the ram is raised in a slide and allowed to drop on the head of the pile. Repeat until the pile is at the required depth. Make sure you are wearing your ear protectors if you're nearby. Hammer driving can also have a detrimental effect on nearby buildings, as the seismic waves generated are powerful. Typically the ground around the driver will jump a few inches with each blow.

(There is a method in which the ram is constructed to form a single cylinder diesel engine but I'm unfamiliar with this technique. Most of the pile drivers I've seen were hydraulically raised hammer or mechanical vibration types.)

Vibration drivers operate on a different principle. Usually there is a hydraulic arm and a motor driving an eccentric cam or a shaft which is weighted to put it out of balance; the vibration causes the earth to assume liquid-like properties and the pile slowly glides in under the pressure of the pile driver arm. This is nowhere near as noisy as hammer driving. Unfortunately the powerful seismic vibration can have a bad effect on nearby buildings and can be quite unpleasant for nearby humans.

Press drivers use (usually) hydraulic brute force to push the pile in; doing it like this requires Big Science but has the advantage of being relatively quiet and kind to nearby foundations and people.

For driving smaller pilings or for shoring trenches, the bucket of a digger can be used to good effect. Just raise it up and bring it down hard.