Its a complex set of responses and I am not sure even psychologists fully understand it. Many still see this response as a paraphillia - an inappropriate sexual response - and class it as a 'psychological problem which needs to be addressed'. However, I think everyone has some level of unusual sexual desires somewhere in their make up - even if it is only 'gets turned on by the missionary position' (which is rare enough to be a fetish in my opinion )

There is a link to Pavlov's theories - association of a particular stimuli with a particular response. Dog sees food when bell rings and salivates, eventually the bell alone is enough to make the dog salivate. Human gets turned on by seeing sexy person in pain or in bondage, eventually its just the pain or bondage that can trigger it. I'm simplifying things a lot but that is the basics of it. The age old psychological debate of 'nature vs nurture' comes into it as well - are you the way you are because of your genetic heritage or because of the way your environment moulded you?

Neurochemically, I know why masochists get their kicks. When you are in pain your body is flooded with chemicals - serotinins, adrenalin and so on. They are there to help you ignore the pain and to give you the extra boost you may need to run away or fight but some of them also give you a sense of strength and pleasure. Its the same reason why people throw themselves of bridges tied to a piece of elastic. Perhaps sadists also get the same response to the excitement of inflicting pain?