An altimeter in an aircraft measures the altitude above a fixed level, usually sea level, by analysing air pressure differences. It helps pilots maintain desired flight levels and manage separation from terrain or other aircraft, ensuring safe navigation and control.