“tad eva artha matra nirbhasam svarupa shunyam iva samadhih" - Patanjali
When only the essence of that object shines forth in the mind, devoid of its own form, that state of deep absorption is called samadhi

Samadhi can be explained in many aspects. But do understand it is all the same phenomenon explained from different perspectives.

Samadhi is the experience that is beyond the influence of nature. State of consciousness with no vritti (fluctuation). In simpler words, the individual is sitting with no vicissitudes of thoughts, like a lake in absolute stillness. With dhyana, there is still an observer, observing, the observed. When the observer, the process of observing, and the object being observed all three collapse and the only thing remaining is the object, it is the experience of samadhi. When this deep absorption happens, dhyana has evolved into samadhi.

There are four kinds of vasanas (desires) that drive mankind. They are;
1.) Dharma - desire to fulfill duties, social/ethical/moral uplift.
2.) Artha - desire to accumulate resources, knowledge, wealth.
3.) Kama - desire to gratify sensual experiences.
4.) Moksha - desire for liberation and enlightenment.

These vasanas (desires) lead to karma (action). When such actions are not totally experienced, it leaves a residue called samskara, which again leads to newer karmas (actions) abiding the laws of cause and effect. Hence every reaction is the result of previous samskara. These samskaras when not expressed or experienced again, it gets buried deep under newer samskaras and these suppressed samskaras are expressed in our dreams, behavior pattern and diseases.

Force of vasana (desire) to experience these samskaras again and again is channeled through ida nadi (left nostril) driving the chitta sakthi (mental energy) and force that leads to karma (action) is channeled through pingala nadi (right nostril) driving the prana sakthi (life energy). When these both are channeled through sushumna, the vasana (desire) -> samskara (residue) -> karma (action) chain is broken.

Once broken, no more new vasanas, samskaras and karmas are accumulated. This triggers the process of depletion and draining all the existing samskaras. When all the samskaras are totally evacuated, the individual is an enlightened being. When someone can reach this point, they have absolutely mastered the art of total experience that leaves no residue. This means, any karma (action) is absolutely a total response, leaving no residue (samskara). This is the ultimate goal of anyone embarked in pursuit of moksha (liberation).

When the energies are channeled through sushumna, he/she is experiencing the samadhi. In initial stages of deep absorption, when one is unconscious of everything, there still remains fluctuations. It is called sankalpa (thought) and vikalpa (counter-thought). These vikalpas could be often misunderstood as samadhi, but it is not. Samadhi evolves in multiple stages as listed below;
1.) SaVitarka (Identified with gross physical forms like body, face, wealth, etc)
2.) NirVitarka (Unidentified from physical forms)
3.) SaVichara (Identified with subtle forms like thoughts, knowledge, opinions, etc)
4.) NirVichara (Unidentified from such subtle forms)
5.) Ananda (Identified with the experience of bliss)
6.) Asmita (Identified with psychological imprints, samskaras)
7.) SaVikalpa (This is very very subtle, identified with the ability to stop any thought to occur)
8.) NirVikalpa (Unidentified with anything gross or subtle)

This NirVikalpa Samadhi is the ultimate samadhi. In the current times, ego is one of the most overloaded words which in general means identity of a person. This 8 stages of samadhi can also be called as gradual and total dissolving of this ego. As one can see, it is not as easy as it sounds when people say "drop your ego". Without a complete understanding, maturity and a guidance of a right guru, it is very easy to be mislead at every stage to a sense of gratification and attainment already. It becomes increasingly difficult at every successive stage.

As explained before in Yoga: 2. Where to start?Upayas (Ways) to attain grace of samadhi;
1.) anavopaya (kriyopaya) - Kriya Yoga
2.) shaktopaya (jnanopaya) - Jnana Yoga
3.) shambhavopaya (bakthopaya) - Bakthi Yoga
4.) anupaya (anandopaya) - Karma Yoga