You will be permitted a 30-day stay in Egypt once you arrive. This implies you can stay in Egypt for up to 30 days without leaving or extending your visa. If you want to stay in Egypt for more than 30 days, you can apply for an Egypt visa which is valid for 6 months with multiple entries: 30-day for each stay.
To apply for a visa extension, you must go to Egypt's Ministry of Interior and fill out an application. The procedure can be time-consuming and may need additional documents, so plan ahead of time if you know you will need to extend your stay.
It's also worth noting that there are certain limits on what you may do in Egypt while on a tourist visa. You cannot, for example, work on a tourist visa, and you may be required to present proof of onward travel upon entering the nation.