Most foreigners begin by applying for a one-year residence visa, which can be done at an office of the Ministry of the Interior with a valid passport. The office will supply you with the necessary application materials.
Three-year residence visas are more common for foreigners with valid work permits, as are five-year residence visas.
While technically speaking, there are rules governing who is eligible for which visa, you will find that these are subject to loose interpretation by government officials. For more specific and up-to-date information on the residence visa application process and its requirements, you will be best served by contacting the Egyptian consulate in your home country.