Sore nipples may discourage the parent from continuing breastfeeding.
How to cure sore nipples resultant from improper breastfeeding?
The most important step is to stop whatever is causing the problem. If it is an improper latch, fix the latch. If it is a yeast infection in the baby's mouth, treat the yeast in the mouth and on the nipples. There are many causes of pain and establishing what is happening is important.
Next, to heal whatever damage is done the most important thing is to keep the skin dry. If you are wearing plastic-backed pads in your bra get rid of them. Very absorbent cloth pads are fine. Change them often if they are actually getting wet. Spend some time with nothing between your nipples and the air. I have read suggestions of 30 minutes a day.
You can buy all kinds of creams and ointments and you can find people who will swear by many different brands and tell you that you simply must have this exact one or that exact one. Many of them contain lanolin and unless you're allergic to wool you will probably find that they do help a little. Vitamin E is also a popular (and probably useful) ingredient.
Finally, make sure you are getting enough rest and eating properly - both reasonably hard to do while learning to be a parent and coping with a newborn's needs, but we heal when we sleep, so if you need to let some tasks go for a while to cope with a growth spurt or to get over some pain or damage you have suffered, do it. You can "catch up" later on whatever you have to leave for a bit.