Modern organs are fully pneumatic, meaning that there is a blower or bellows to pressurize them. When you press a key or pedal on the organ, a valve is opened, thus admitting air into the pipe to make it speak.
The connection from the key to valve can be established any number of ways. Traditionally, when you pressed a key, mechanical linkage pulled the valve open. Also you may encounter direct electric action, like Wicks organs used. This used an electromagnet to open the valve. There is also electro-pneumatic, where an electromagnet lets air into an actuator which pulls the valve open.
Organs have different stops to control the voices. When no stops are pulled, the organ will make no sound when keys are pressed. To make sound, one must pick one or any number of stops to play. Each stop consists of one or more ranks of pipes. Some stops may make use of parts of other ranks. An eight foot stop is in unison. The not you play is the not that comes out. When you pull out a four foot stop, it sounds an octave higher, and a two foot stop, an octave higher still. You can combine these stops to make a principle chorus.
There are other kinds of stops, like mutations, which make a not that is not unison or octave, and thus create a parallel melody, which can add interest or create new sounds. There are reeds, which can play sounds like trumpets and oboes. These pipes are not like whistles, but have a beating metal tongue to make the sound out a resonator.
Each organ may have one or more manuals or keyboards. Each one controls a different part of the organ. There may be a great division, the main part. There could be a positive division, which is a smaller division. Some divisions have shades in front of them to control the volume. These shades are controlled by expression pedals.
Organs also have pedals, so the organist can play the base line with their feet, freeing hands to to the alto, soprano, and tenor parts.
And remember, an organ is only similar to a piano in the sense that it has a keyboard.
The sound is produced by pressing the keys which causes air to be blown through pipes of different lengths. The large pipes can make some of the best soul shakeing bass. The original sub-woofer