Nirvana and sansara are two common and important terms of Hindu philosophy. These terms are also equally applicable to Buddhist philosophy which are in essence variations of the basic Hindu, or if you want to use a non-religion related word, ancient Indian philosophy. As suggested by Mkcapen in her reply posted above, these terms may also have been used in the novel Siddhartha, But I am not aware to what extent the novel correctly reflects the original concepts.
Sansara is the simpler one of the two terms. It simply refers to the physical world or the universe that we see and experience as ordinary human beings. However, as per the Hindu philosophy the world is not as much of a physical reality as it appears. It exists only as a collection of perception by the souls occupying the soul, somewhat like a dream seen by a person in sleep. Just a s person experience joys and distress in a dream, but on waking up the experiences of the dream appear meaningless, the happiness and miseries of the sansara experienced by the soul will become when the soul realizes its true nature. When the soul sort of wakes up. When this happens soul experiences a sense of extreme ecstasy without any pain or distress associated with the physical life of sansara.
The soul is unable to come out of this state of experiencing the sansara because of reasons that we do not need to go into. But as a result of this inability individual soul must go through repeated cycles of birth - life - death - and rebirth. Nirvana refers to a state of realising the true nature of one's soul that leads to release from bondage of cycle of birth and death.
So we can say that nirvana is the state of realization of true nature of the soul. Which also implies the realization of the sansara as being unreal like a dream.
I believe that you are referring to the book Siddhartha in which the young man goes in search of Nirvana. It is the priests of the forest, the Samaras that believe that order to reach a state of Nirvana one must suffer by learning to excuse the body of all physical needs in order to reach the plane of perfect understanding.
The concept was coined by the Samaras. However, the state of Nirvana has been one that mankind has search for endlessly. Not only do the Samaras search for enlightenment and perfect inner peace, but so do the Hindus, the Buddhists, and the other priests.
In the book when Siddhartha finally quits searching and has met all levels of his own destiny, he reaches the state of Nirvana.