Trained as a pilot, Mubarak worked his way up to the rank of general in the Egyptian Air Force. Anwar Sadat, the president before Mubarak appointed him vice president in 1975. In 1981, Sedat was assassinated and Mubarak became president. There have were no allegations that Mubarak had anything to do with Sedat's death.
He remained in office until Feb 11, 2011 (yesterday).