Moksha is the liberation from samsara (the cycle of death and rebirth). It is often used interchangeably with nirvana, which in Buddhism is considered to be the ultimate liberation.
I think of Moksha as the liberated state, and nirvana as the feeling of bliss in that state. Different philosophies of Hinduism use different terms for moksha, such as kaivalya (state of Absolute) from the Yoga Sutras of Patañjali.
It is attained by disidentification with the body and mind, which are temporary and subject to change, and realization of our true identity. That means it has passed beyond the level of philosophy and religion, beyond the level of words and thought and has become a vibrating reality at the foundation of your being, spontaneously illuminating all that you experience. This is liberation. This is awakening to the Truth. This is the reason why you took birth.