Mahasamadhi is seen as the ultimate goal of any spiritual seeker. This is because any state of enlightenment that occurs while the yogi is in the physical realm is still limited by their physical body. When they enter mahasamadhi, they transcend their body. Their individual bubble of existence ends, and they become dissolved and liberated into the unity of everything.
To prepare for mahasamadhi, the yogi must first practice and apply discipline in their spiritual endeavours until they reach nirvikalpa samadhi. They may then incrementally ready themselves through their practice of samadhi. It is possible that they die during their sadhana practice, or during a specific disciplined preparation for their death. This process is unique and individual to each yogi.
The term, mahasamadhi, may also refer to the shrine of a great yogi. Such shrines are generally placed close to the location where the yogi entered mahasamadhi.