As defined by FAA in the Pilot's Handbook of Aeronautical Knowledge:
Pressure altitude is the height above a standard datum plane (SDP),
which is a theoretical level where the weight of the atmosphere is
29.92 "Hg (1,013.2 mb) as measured by a barometer. An altimeter is essentially a sensitive barometer calibrated to indicate altitude in
the standard atmosphere. If the altimeter is set for 29.92 "Hg SDP,
the altitude indicated is the pressure altitude. As atmospheric
pressure changes, the SDP may be below, at, or above sea level.
Pressure altitude is important as a basis for determining airplane
performance, as well as for assigning flight levels to airplanes
operating at or above 18,000 feet.
The pressure altitude can be determined by either of two methods:
1. Setting the barometric scale of the altimeter to 29.92 and reading the indicated altitude.
2. Applying a correction factor to the indicated altitude according to the reported altimeter setting.
More info from the FAA here.
From Docket No. 18334, 54 FR 34304, Aug. 18, 1989, as amended by Amdt. 91-314, 75 FR 30193, May 28, 2010
§91.217 Data correspondence between automatically reported pressure altitude data and the pilot's altitude reference.
(a) No person may operate any automatic pressure altitude reporting equipment associated with a radar beacon transponder—
(1) When deactivation of that equipment is directed by ATC;
(2) Unless, as installed, that equipment was tested and calibrated to transmit altitude data corresponding within 125 feet (on a 95 percent probability basis) of the indicated or calibrated datum of the altimeter normally used to maintain flight altitude, with that altimeter referenced to 29.92 inches of mercury for altitudes from sea level to the maximum operating altitude of the aircraft; or
(3) Unless the altimeters and digitizers in that equipment meet the standards of TSO-C10b and TSO-C88, respectively.
(b) No person may operate any automatic pressure altitude reporting equipment associated with a radar beacon transponder or with ADS-B Out equipment unless the pressure altitude reported for ADS-B Out and Mode C/S is derived from the same source for aircraft equipped with both a transponder and ADS-B Out.
ICAO has described how they calculate Pressure Altitude
In relation to QNE:
When the ISA mean sea level standard pressure of 1013.2 hPa is set on
an aircraft altimeter subscale, the height so indicated upon landing
at an airfield is known as the QNE reading. More widely, this is also
the PRESSURE ALTITUDE, which is alternatively defined as the height of
any level in the international standard atmosphere (ISA-see above),
above the level corresponding to a pressure of 1013.2 hPa.
Here is a free tool to calculate standard atmospheric conditions (ISA) at a given geometric or pressure altitude and ambient temperature.