Abstinence means refraining from having any sex, either totally (not even through masturbation) or partly (sex with another person is out but masturbation is okay).