Although it’s difficult to take Iran visa yet possible. First of all you should get an authorization code. It takes up to one month to get the code. You can apply to get the code through an Iranian travel agency.
If you are a citizen of USA, Canada or UK, you need to take a tour guide that is approved by the foreign ministry of Iran. You should introduce the tour guide to the MFA while applying for the code. Then you should go to the embassy of Iran by person and submit your visa application.
Ladies should wear a shawl while taking photo for visa or else your request will be rejected.