Is it a sin to have a sexual urge or desire?
No. Sexual urges are in fact God given desires.
Or is it a sin when we give in to it by entertaining or acting on the feeling?
It is a sin when we allow our natural passions to rule us in a manner that leads us to sinful actions. The drive itself is not sinful, but with sexual sins, we are called to cultivate chastity which is a cultivation in self mastery.
Also is it wrong to ask God to take away the desire when it arises?
I would encourage you to pray for the grace to avoid sin. Suppressing your sexual desires throws out the baby with the bathwater. Certainly it would seem that many try this approach without success, but some do successfully suppress their sexualities and have difficulties suddenly unlocking the door and letting their sexuality out. It can be confusing because before you’re married its like you’ve locked some abused child in the closet who keeps escaping and who you beat and drag back into the closet. Then you get married, unlock the closet and find the child is so afraid of you that the child huddles in a corner to get as far away from you as possible. Then you can get it in your head that “well you have to pay your marriage debt” so you start yelling and screaming and abusing the child again to try to force the child out only to find it makes the situation worse.
I would encourage you to respect your sexuality and to see it as a positive faculty that you must strive to govern. Thus rather than abusing the child, you discipline the child, you set limits on the child, but you ensure that the child is not demeaned.
How can someone control their sexual desire without committing a sin?
The way I see sexuality now is that sexual desire is like wind and you are like a sail. Now, an inexperienced person on a sailboat will just float into chaos and have no control. Chastity is like becoming a well trained sailor. Since marriage, I’ve learned to see my sexuality in much broader terms. It is not merely eroticism. It is any physical expression of communication especially as it relates to my being female. So I see giving birth as a sexual process. I see giving a friend a platonic hug as a sexual communication though completely appropriate. I’m not lusting in these situations. There is nothing erotic, but in understanding that all these things we don’t think of as sexual as actually an aspect of our sexuality helps us to recognize that it is one and the same “wind” that blows us. Thus as the Catechism says
2347 The virtue of chastity blossoms in friendship. It shows the disciple how to follow and imitate him who has chosen us as his friends, who has given himself totally to us and allows us to participate in his divine estate. Chastity is a promise of immortality.
Chastity is expressed notably in friendship with one’s neighbor. Whether it develops between persons of the same or opposite sex, friendship represents a great good for all. It leads to spiritual communion.
In regards to the wind directing your course to erotic sexual behavior, that is a tough one. Generally speaking, it is good to take advise from your elders who’ve had experience “sailing” into the sexual waters who know “Ok, if you turn your sail this way, the wind will likely take you over here.” So you want to avoid “near occassion of sin.”
Its not perfect though. Resistance can in fact build sexual tension and as your relationship grows, sexual tension will build.
I would thus encourage you not to be too hard on yourself. Go to confession frequently and expect cultivating the virtue of chastity to be a long process. You’ll be clumsy with it in the beginning just as someone is on a sail boat the first time, but you can learn to master yourself so that you can read the winds and still have full command over yourself.