How is the cabin pressure maintained inside aircraft?
Once the airplane is closed up, all doors and windows secure, pressurization comes down to the following:


how much air is being pumped into the cabin?
how much air is being let out of the cabin?


Air enters the cabin (on a jet powered airplane) through bleed air taps in the high pressure compressor of the engines.  This air is routed through air cycle machines, or "packs" as they are commonly referred to.  The packs condition the air for temperature and humidity (typically taking all of the water out of the air) and then pump this air into the cabin at high pressure such that it is at the proper temperature after expansion to cabin altitude.

Air exits the cabin through outflow valves, which are typically at the rear of the pressure vessel.  These can be manually or computer controlled and will open and close to regulate how much air leaves the cabin.

To provide constantly fresh air, the incoming air from the packs is constantly supplied and as such the cabin pressure is almost entirely regulated by the outflow valves.  These valves have to be able to exhaust more CFM of flow than the packs can supply in order to let the cabin climb and when providing less CFM
than the packs the cabin will descend.  

The cabin altitude will be managed so that:


it stays below a maximum pressure differential with the ambient atmosphere outside,
cabin altitude rate of change is limited,
maximum cabin altitude is kept below 10k feet (and typically below 8k feet) such that supplemental oxygen is not needed.