In hindu faith caste is by birth, the folloing link sheds some light on caste system
The Caste System in Hinduism