The state of celibacy (usually synonymized with chastity) is when a person is voluntarily unmarried (or unpartnered) and/or deliberately practices Sexual Abstinence (Sexual Continence) or restraint.
Celibacy is typically engaged in because of religious, philosophical, or spiritual reasons being a form of asceticism, but it can also be practiced as a method of birth control, or even for physical health benefits, for instance, to avoid sexual transmission of diseases or by using it as a technique for Semen Retention.
For some roles and positions in certain religions, celibacy (or chastity) is an obligation (or preferred practice). Think of the ordained Buddhist monks in Asian monasteries or priests in the Catholic church.
Celibacy can also be a prerequisite (or preferred state) for certain practices such as is sometimes the case in Indian spiritual traditions — then called Brahmacharya — notably for those who want to attain Enlightenment or Moksha. By contrast, in many religions or spiritual traditions celibacy or sexual abstinence is seen as unnatural, something that shouldn’t be practiced at all.
The idea behind celibacy with regard to spirituality is that sexual activity is a hindrance for spiritual attainment or progress, something that distracts from the “realm of the spirit” and keeps one “in bondage and in corruption” in the material, impermanent world. As such, sex needs to be restrained or totally avoided. Here again, there are spiritual traditions, such as in Tantra and Taoism, that adhere to exactly the opposite, that is, one should explicitly engage in sexual activities and use sexual energy for spiritual purposes.