By learning how to be kind and forgiving of yourself.
It took me a while - I spent a lot of years hating my art, and hating myself for not being as good as other people, and being bitterly jealous, and it sucked and was horribly detrimental to both my own mental state and, well, any hope of artistic development. Learning how to forgive myself for not being the best at something, and for screwing up, helped me get past hating my art.
I have high standards for myself. I'm a workaholic who feels guilty for taking breaks from drawing, and am a perfectionist who can fiddle endlessly with the tiniest details to get them right. Of course I still have days when I look at my art and just want to drown myself in a bucket.
... but these days they're outnumbered by the days when I look at an imperfect piece and think "wow, this has a bunch of flaws - but that's okay! I'm learning!". It takes time and conscious effort to get to that place, though, and I've been working at it for a long time.
Next time you look at a piece and hate it, tell yourself that you have to find at least one positive thing about it. Just one. And with the piece after that, try to find two. Practise. Getting over this kind of self-loathing is difficult, and it's got everything to do with repetition. Repeat positive thoughts. Forgive yourself for messing up. Beat into your head that a bad attempt is better than no attempt at all. And no time is ever wasted in art. Even when you screw up and draw bad things, you will have learned something. Even if that something is just "don't draw heads that big".
Ultimately, though, we're just strangers on the internet, and if you feel like this art-loathing stems from deeper self-confidence issues, you should probably speak to a mental health professional about it in some way.