When you're not having any, it almost becomes a non-issue. Something you rarely think about until you try and count the days, weeks, or months since you last touched another body and find yourself stumped.
Before you start to doubt yourself, your sexuality, or your sexual prowess, try and understand that dry spells don't mean there's "something wrong with you" (or, if you're in a relationship, "something is wrong with us").
This is an intrinsic feeling many of us get when we're struggling to be sexual. Acknowledge and appreciate that you're not the only one to ever feel this way, and that you're just in an emotional and/or physical funk that you have to push yourself out of.
Whether you're single or in a relationship, getting back into sex after a period without it requires effort. You probably won't have a switch "flicked on" one day and suddenly feel sexual again.
Verbal communication is very important here, although I find this part is even more difficult than initiating any kind of physical contact.
Personally, I've found that the longer I go without discussing a dry spell I'm in, the more riddled with anxiety I become about having sex again. I put a lot of pressure on myself to "perform" because it has been so long, and duress can prevent me from even trying.
For this reason, I find it's desirable to start this journey with non-sexual touching and intimacy. It's like dipping your toes into the cold water to see how it feels. Even when you don't feel like cuddling or kissing someone else, forcing yourself to make time for it can alert your brain of its need for physical pleasure. Like going to the gym after a long time off, there will be a degree of muscle memory there.
Then, naturally, more chat is needed. If you're partnered, you don't want to go down the blame track – it might be easy to say "you've been working too often", "I always am the one to initiate and you shut me down", or "you seem tired all the time", but nothing good can come from this line of conversation.
Preferably, use "I" statements instead so both parties are acknowledging their contribution to the dry spell, and not finger-pointing. Together, it should see you going somewhere instead of brick-walling (or discovering an underlying issue that you can then accept, and deal with).
Once you feel the lines of communication are open and you've been enjoying non-sexual intimacy without intimidation, you may then be ready to start "feeling sexy" again. I find this is often helped with a change in physical appearance – e.g. a bold new outfit or a great new hairstyle – something that makes you feel a bit different than before.
Consider going underwear shopping together, or just doing it online: I find the mutual enjoyment of seeing pictures of other near-naked people and wondering what certain items would look like on me (or my partner) to be a nice turn-on. It makes you feel connected to your body and what's underneath the clothes you hide yourself in when you're not feeling very sexual.
When you get to the point of actually feeling like your libido is game for sex again, take it slowly and don't expect the event itself to be phenomenal. Accept that one or both of you might feel somewhat awkward or uncomfortable or not be able to orgasm. Such is all perfectly acceptable – nobody has porn star sex after a period of celibacy.
The most important part of getting past a dry spell is understanding that one successful sexual encounter isn't the goal here. You are trying to get a regular sexual routine in place (which may be more or less frequent than before).
This will involve continual communication as time goes by, and a conscious effort from both partners to ensure each feels individual responsibility for not going back to your comfortable, sexless old ways.