Barzakh means a barrier or isthmus, something set between two things that keeps them from merging. The Qur'an uses it of the divide between fresh and salt water (25:53, 55:19-20) and once, decisively, of the state of the dead: those who ask to be returned to the world are told that "behind them is a barzakh until the day they are raised" (23:100). From that verse the tradition built its doctrine of the intermediate state, the interval between death and the general resurrection.
The content of that interval comes chiefly from hadith rather than the Qur'an: the questioning in the grave by two angels, commonly named Munkar and Nakir; the grave that is widened into a garden of the Garden for the believer or narrowed into a pit for the wicked; the soul's awareness of the living. Both Sunni and Shia traditions affirm an intermediate state, with Shia sources giving particular attention to the souls of the faithful gathered in the valley of peace.
Theologians differed over how literally to read it. Ash'ari scholarship generally affirmed the punishment and bliss of the grave as real and bodily; Mu'tazili theologians and later philosophically inclined writers tended toward figurative or spiritual readings, since the body visibly remains where it was buried. In Sufi metaphysics the word was generalised: Ibn Arabi made barzakh a technical term for any isthmus between two orders of being, and above all for the alam al-mithal, the imaginal world standing between pure spirit and dense matter, a usage that later shaped Persian illuminationist philosophy.