Mars is ANY desire we have .. .not just sex ... desire for a car, desire for a piece of pizza. ANYTHING we want.
So Mars is desire. AND how we take action to go after what we want. Our initiative, our drive, our assertiveness and courage to take action and risks. Also impulsivness.
And how we react when we are thwarted/obstructed in going after what we want .. so that includes how we handle frustration, anger, aggressive urges.
The 12th house is the house of our unconscious.
So when Mars is in the 12th house, the person is not usually consciously aware of what they really want. So when they go after what they want, they cannot find the motivation to stay with it, since motivation is driven by our unconscious.
And often they will find themselves doing something impulsively but not consciously understanding WHY they did this.
Until they learn to be more-in-touch with their unconscious, they find it difficult to take actions that work well, easily, for them.
The better-aspected Mars is with other planets, the less trouble they have, and they may - in fact - be very intuitive in understanding what they need to do in any situation.
But the more stressful aspects other planets make to Mars, the more trouble they have when they take action.
As for sexuality.
Mars is about how we go after what we want, Venus is about how we relate with others, and Moon is out automatic emotional responses. ALL of these are involved in our sex life. And sometimes Saturn .. a badly-aspected Saturn can make us feel inferior and that can hinder enjoying sex because of shame or fear.