Samadhi is that state when the self and the ultra self becomes one and equal and all the Samkalpas cease to exist. It is said that the state of Samadhi is very difficult to obtain without the help of the Guru because in the state of Samadhi it is essential that the Yogi detaches himself from all worldly enjoyments and gains the knowledge of all the realities in the world. When in an individual the great power awakens it is then that the Prana gets absorbed in the Sunya.
A Yogi whose power has awakened and he who has been able to renounce all worldly enjoyments are able to attain the state of Samadhi. When the Yogi has entered the state of Karma he is free from all effects of Karma. In the state of Samadhi the mind becomes and calm and it has also been said that unless an individual is able to make the mind and the Prana latent he will not attain Moksha.
Hatha Yoga Pradipika says that a Yogi who has controlled his breathing, has controlled his Prana and also controls the activities of his mind is able to attain the state of Samadhi. The mind has two activities namely Vasana and Prana and it is said that controlling one of them is destruction of both the activities. When in an individual the mind is absorbed breathing is lessened and when the mind is absorbed the Prana gets restrained.
In the state of Samadhi the mind gets united with breath and the mind begins its activities where there is breath and the Prana begins its activities where there is mind. Whenever the Indriyas or the senses of the Yogi become latent he is able to attain the state of Samadhi.
Hatha Yoga Pradipika states that when the mind is controlled in an individual it becomes possible to accomplish all other things in life. Mind is the master of the senses and breath is the master of the mind and when this mind gets absorbed a sort of ecstasy or Moksha is experienced. When the mind becomes devoid of all activities and becomes changeless the Yogi is able to attain the Laya stage which is the state of Moksha.
Finally it has been said that in the state of Samadhi the mind becomes one with the Brahman and is devoid of all senses and activities. The mind also gets detached from all transient existences of the universe and in the process attains Moksha.