Introduction
How is the Military in Iran and how does it work to maintain Sucity and fight terrorism? In terms of Military and security forces, we have the the military forces of Iran are divided between the Islamic Republic of Iran Regular Forces (Artesh) and the Islamic Revolutionary Guard Corps (Sepah):

Islamic Republic of Iran Regular Forces or Islamic Republic of Iran Army (Artesh): Ground Forces, Navy (includes marines), Air Force, Air Defense Forces

Islamic Revolutionary Guard Corps (IRGC or Sepah): Ground Forces, Navy (includes marines), Aerospace Force (controls strategic missile force), Qods Force (aka Quds Force; special operations), Cyber Electronic Command, Basij Paramilitary Forces

Ministry of Interior: Law Enforcement Command

Ministry of Intelligence and Security (2024).
In Iran, the Islamic Revolutionary Guard Corps (IRGC) was formed in May 1979 in the immediate aftermath of Shah Mohammad Reza PAHLAVI’s fall, as leftists, nationalists, and Islamists jockeyed for power; while the interim prime minister controlled the government and state institutions, such as the Army, followers of Ayatollah Ruhollah KHOMEINI organized counterweights, including the IRGC, to protect the Islamic revolution; the IRGC’s command structure bypassed the elected president and went directly to KHOMEINI; the IRGC played a critical role in helping KHOMEINI consolidate power in the aftermath of the 1979 revolution, and it ensured that KHOMEINI's Islamic revolutionary vision prevailed against domestic challenges from nationalists and leftist factions in the scramble for control after the Shah's departure

the Iran-Iraq War (1980–88) transformed the IRGC into more of a conventional fighting force with its own ground, air, naval, and special forces, plus control over Iran’s strategic missile and rocket forces; today, the IRGC is a highly institutionalized and parallel military force to Iran’s regular armed forces (Artesh); it is heavily involved in internal security and has significant influence in the political and economic spheres of Iranian society, as well as Iran’s foreign policy; on the economic front, it owns factories and corporations and subsidiaries in banking, infrastructure, housing, airlines, tourism and other sectors; its special operations forces, known as the Qods/Quds Force, specialize in foreign missions and have provided advice, funding, guidance, material support, training, and weapons to militants in countries such as Afghanistan, Iraq, Syria, and Yemen, as well as extremist groups, including HAMAS, Hizballah, Kata’ib Hizballah, and Palestine Islamic Jihad; the Qods Force also conducts intelligence and reconnaissance operations; note - both the IRGC and the Qods Force have been designated as foreign terrorist organizations by the US 

the Supreme Council for National Security (SCNS) is the senior-most body for formulating Iran’s foreign and security policy; it is formally chaired by the president, who also appoints the SCNS secretary; its members include the speaker of the Majles, the head of the judiciary, the chief of the Armed Forces General Staff (chief of defense or CHOD), the commanders of the Artesh (regular forces) and IRGC, and the ministers of defense, foreign affairs, interior, and intelligence; the SCNS reports to the supreme leader; the supreme leader is the commander-in-chief of the armed forces

the Iranian Armed Forces are divided between the regular forces (Artesh) and the IRGC; the Artesh primarily focuses on defending Iran’s borders and territorial waters from external threats, while the IRGC has a broader mission to defend the Iranian revolution from any foreign or domestic threat; in 1989, Iran established the Armed Forces General Staff to coordinate military action across both the Artesh and the IRGC; Iran also has a joint military headquarters, the Khatam ol-Anbia Central Headquarters, to command the Artesh and IRGC in wartime (2024)
Security and military information of Iran
Military and security service personnel strengths information varies; up to 600,000 active armed forces personnel; approximately 400,000 Islamic Republic of Iran Regular Forces (350,000 Ground Forces; 18,000 Navy; 40,000 Air Force/Air Defense Forces); approximately 150-190,000 Islamic Revolutionary Guard Corps (100-150,000 Ground Forces; 20,000 Navy; 15,000 Aerospace Force; 5-15,000 Qods Force); estimated 90,000 active Basij Paramilitary Forces (2023)
Military equipment inventories and acquisitions the Iranian military's inventory includes a mix of domestically produced and mostly older foreign equipment largely of Chinese, Russian, Soviet, and US origin (US equipment acquired prior to the Islamic Revolution in 1979); it also has some military equipment from North Korea, including midget submarines and ballistic missiles; in recent years, Iran has received some newer equipment from Russia; Iran has a defense industry with the capacity to develop, produce, support, and sustain air, land, missile, and naval weapons programs (2024)
Military service age and obligation military service is compulsory for all Iranian men 18-19 to approximately age 40; 16 for voluntary military service (may be as low as 15 for the Basij); conscript military service obligation is up to 24 months, depending on the location of service (soldiers serving in places of high security risk and deprived areas serve shorter terms); women exempted from military service (2023). note: conscripts serve in the Artesh, IRGC, and Law Enforcement, while Navy and Air/Air Defense Force personnel are primarily volunteers
Military deployments continues to maintain a military presence in Syria reportedly of a few thousand personnel, mostly of special operations and IRGC forces (2024). note: Iran has recruited, trained, and funded thousands of Syrian and foreign fighters to support the ASAD regime during the Syrian civil war
Military expenditures
Military Expenditures 2023 2.1% of GDP (2023 est.)
Military Expenditures 2022 2.5% of GDP (2022 est.)
Military Expenditures 2021 2.3% of GDP (2021 est.)
Military Expenditures 2020 2.1% of GDP (2020 est.)
Military Expenditures 2019 2.5% of GDP (2019 est.)
Terrorism
In Iran, the different Terrorist group(s) inlcude: Islamic Revolutionary Guard Corps (IRGC)/Qods Force; Islamic State of Iraq and ash-Sham (ISIS); Jaysh al Adl (Jundallah); Kurdistan Workers' Party (PKK); al-Qa’ida
All Important Facts about Iran

Want to know more about Iran? Check all different factbooks for Iran below.

Iran is found in Southern Asia