Nirvana is the state of enlightenment, as was achieved by the Buddha after he sat under the tree to meditate. It is a complete freedom, a spiritual freedom. The ultimate path of Buddhism is to the attainment of Nirvana. Each individual person is the result of causes which have been carried over from their past existence, in a past life. An individual's karma affects their future existence, it impacts upon future lives.
Good conduct brings good karma, which brings pleasant results for the next life.
Bad conduct is bad karma which brings unpleasant results for the condition of one's next life. This belief in rebirth is called samsara . One escapes the cycle of life and rebirth through good and ethical conduct, correct mode of living, and meditation. This cycle of rebirths comes to an end when one achieves Enlightenment, overcoming the round of rebirths is the attainment of Nirvana.