Incision pain should be expected after surgery, because surgical incisions don't just cut through the skin, but in some cases nerves, tissue, and even muscles. The surgeon will have specific advice for dealing with the pain, but in most cases it is just necessary to get plenty of rest and take the pain medication as it is prescribed. Leaving the incision alone is often the best way to deal with the pain. The application of heat or cold, such as a heating pad or ice pack, is typically not recommended for dealing with incision pain, as this can negatively affect the healing process.
The most important thing to keep in mind when dealing with incision pain is whether or not it is an appropriate amount of pain, and the incision is healing properly. The incision should be dry and should not have pus around it, and it should not be hot to the touch. Slight redness is to be expected, but if the incision is bright red or has streaks coming off it, it is likely infected. This is often associated with severe pain, and if any of these things occur, it is important to call the doctor immediately. Severe pain can also occur if the stitches or incision are separating, which requires immediate medical attention as well.
After surgery, the surgeon will likely prescribe pain medication for incision pain management. It is important to take these pills as they are prescribed, and not to try to "tough it out," which can actually delay the healing process. If you need to adjust your medication in order to take more or less, just talk to your doctor; most of them will be happy to adjust the dosage. To avoid causing additional pain, wait until after you've taken your pain medication to change your bandage, and then be very careful not to bump it.
Getting enough rest and following the doctor's instructions regarding movements and lifting heavy items is also very important for managing incision pain. The first few days or even weeks after surgery are especially important for taking it easy, and sitting or lying down in order to begin the healing process. After that, avoid stretching, reaching, or lifting anything too heavy. All of these can aggravate the incision or, in the worst cases, cause a hernia or cause the incision to actually open up. Other than that, it simply takes time for the incision pain to fade, which will vary depending on the extent of the actual incision.