Have you ever programmed your ATmega328P successfully before? If not, that message most likely mean a configuration problem. It is just saying your IDE can't communicate with the MCU. It may take a while before you can successfuly program your ATmega for the first time. In this case, I can't help you without more information about your setup.
If you were able to program it at some point, but can't do it anymore, then the message you're getting from avrdude may be a sign that your MCU is no longer working.
To check if your ATmega is still alive, follow these instructions:
Does the ATmega still display its heartbeat? Normally the bootloader for Arduino Uno and similar boards have a heartbeat feature to tell the users it's alive: it's three quick blinks on the LED attached to pin 13, right after boot. Does yours still do it? If so, you can relax: it's alive.
If it does not blink three times anymore, has it ever blinked after boot before? For example, when you hooked up your Arduino board to a USB port in your computer (I'm assuming you have a USB board), has it ever blinked three times after boot?
I don't want to alarm you or anything. I'm not saying that your ATmega is burnt. But it is kind of difficult to really know when it is burnt. The message you're getting is one sign of it, but can be many other things. I have burned 3 of those chips, myself, and it is a sad moment, that's for sure.
In my case, a few things hinted at the problem. Before I had the problem, I was able to program my MCU using my Arduino Uno board. At some point, I did something that made the MCU stop working. Often is some short-circuit I caused when making changes to a circuit in a breadboard. After that event, the heartbeat stopped and I could no longer program the chip with my Arduino Uno nor burn a bootloader on it. The message from avrdude in all my cases were the same one you're getting. I could however program other ATmegas I had laying around using both methods (that meant it wasn't a problem with the board).
If your MCU continues to do the heartbeat, then it's alive and you are experiencing some other problem, probably communication or IDE configuration. What I usually try next is to burn the bootloader again. If the MCU is ok, it will happily take the bootloader. This way, you also make sure the right bootloader is in place.