Almost everyone needs Iran tourist visa for visiting Iran especially Americans or in general speaking all USA passport holders. Based on Iran’s political regulation Americans are not allowed to travel to Iran by their own and they have to register in a guided tour as well through a local travel agency. They also are not allowed to obtain visa upon arrival and everything must be sorted out in advance.
A travel agency would apply for authorization code as soon as they meet all required documents such as a valid passport, filled visa form, two ways confirmed flight ticket to/from Iran in addition to signed invoice. Usually it takes 30 working days to get this code and travel agency has to share this code with American traveler as soon as it is received. Then Americans can refer to any of Iranian overseas embassies/consulates (that traveler will choose in visa form where to collect visa) to obtain visa which is valid only for tour’s duration. Approval may take few days.
Please consider extending visa is not possible for Americans unless return ticket is changed or airline announces it will be delayed or cancelled. Then to prove this in few days before departure, traveler has to refer to visa department office in either of major cities to extend visa by having either printed email from airline or new flight ticket in addition to receipt of extension fee.