Sufism is the mystical branch in Islam and is expressed either
within Sunni or Shi'ite traditions. Technically, it is not a completely
separate group in that those who adhere to this expression of Islam are
also either Sunni or Shi'ite; however, the mystical strands in Islam
are distinct, so Sufism is often viewed as a third group within Islam.
Sufi Islam, quite simply, is Islamic mysticism. The terms "sufi" and "sufism" are catchall terms used to describe lots of groups, individuals, subdivisions, impulses and time periods across Islam. Sufis point to Muhammad as someone who had mystical experiences both in the receiving of the Quran as well as during his famous "night journey" in which he was taken on a tour of heaven to meet ancient biblical prophets and, finally, to meet God. They also cite many Quranic texts that speak of longing for and friendship with God. Such longing is a dominant theme across the various mystical strands in the Abrahamic religions (Judaism, Christianity and Islam).
Sufism can be traced in different stages throughout Islam's history. In the first 100 years or so after Muhammad, certain ascetic practices began to appear in Islam, such as renouncing worldly possessions, limiting food and sleep, and developing pious inner states and behaviors. Some say that the term "sufi" comes from this early period in which the pious ascetics would wear wool - or "suf" - cloaks.
A shift away from asceticism to love mysticism occurs in the 8th
century. Key individuals in this period are Rabi (717-801 in Basra),
Bayezid Bistami (died 874 in Persia) and al-Hallaj (9th century
Persian). Later in the 12th century, the dominant figure was
al-Ghazzali, a Persian scholar of theology and jurisprudence who turned
to mysticism in his later years. He is most famous for his explanation
of the "99 names of Allah."
Later Sufism, after al-Ghazzali's death, was focused around organized brotherhoods and Sufi "orders" called "tariqa" meaning "path." These brotherhoods were lead by a "shayk" who would instruct and guide the disciples along the path of ever higher levels of reality and spirituality, which included developing virtues like patience, love, poverty and others.
The most famous of these orders is the Mevlevi order founded by Rumi, the 13th century poet who was born in Afghanistan and is buried in Konya, Turkey. This order features the "whirling dervishes" who revolve in a circle - individually and as a group - as part of their meditation on God.