I am in this position. My son's father decided to have nothing to do with with his child while I was pregnant and didn't even want to know if he was a boy or a girl. He lives in a completely different country anyhow, so little chance of any contact even if he did want to keep in touch.
When ds was little I used to explain that his dad lived a long way away. I didn't want to hurt him by telling him the truth, but as someone pointed out to me, I was the one who was lying to him and it's better to be honest than to mislead and it was me with the problem. That made me really look hard at what exactly I should tell him about the situation.
When I split up with my last bf my ds (at age 7) got very upset saying why couldn't I marry him and how he wanted a dad or stepdad like everyone else. When I explained that wasn't going to happen he started talking about his dad instead, saying if he was here everything would be ok and how he wanted to write to him and why couldn't I marry his dad then instead.
I have now explained to my son that he has a father but that isn't the same as a dad. The difference being that a father makes a baby with a mother, but a dad is someone who would be in his life and take care of him and that a dad doesn't have to live with a mum to be able to do that. I use examples of otehr families amongst his class mates who have seperated families etc to help illustrate things and he doesn't feel like the only one that way.
I also had to explain to him that even if his father didn't live a long way away he wouldn't come and help us or be with us as he decided he didn't want to do that and that he had said he wasn't ready to be a father. That was really hard to do, but it all went a bit over his head. It did help stop the requests for me to marry his dad.
He's 9.5 now, and still asks a lot of questions, and still refers to his dad and how he lives a long way away. Whenever I talk to him about it or he is confused I always correct him if he says something that isn't entirely correct and make sure I refer to him as his father. And when he said to my neighbour's mum just the other day he doesn't have a dad and she said of course he did I jumped in quick and explained he has a father, not a dad.
We will have the usual issue at school this week no doubt where they are told to make a father's day card for their dad. This upset ds hugely a couple of years ago when he said he didn't want to make one as he didn't have a dad and was told he had to make one. I've since explained that he can give a father's day card to his grandpa or grandad, or to me even and it has been easier since.
I have found it's better not to avoid talking about itm and not to leave him with false impressions which only lead to more complications. Whatever you decide to tell your child will be up to you and your situation. I do think you should be as honest as possible appropriate to their age though. I also remind him of all the people who do love him loads, including his paternal grandparents who have always kept in touch despite the attitude of their son, and of course me. I always try and finish any conversation on this subject on that sort of note so it feels positive rather than negative.
It's tough, but in a lot of ways I think it does hurts you more than the child, especially when they are younger and don't really understand the full implications. That's been my experience so far anyhow.
Best wishes
Gilly