There are two "danger" zones when it comes to being invaded:
Right around beginning level, from around SL1 to SL10. At this range, you are in danger of being invaded by specially-designed PvP builds, particularly min-maxing Pyromancers. These players take advantage of the relative lack of skill in newcomers and overwhelm them with specially made PvP builds.
SL40 is where many other PvP builds will max out. You generally won't have as much a problem with these invaders as they tend to hang around end-game areas.
As for surviving invaders, there are several methods. If you can, recruit other players by interacting with their soapstone signs. White signs will summon White Phantoms while golden signs will summon members of the Sunlight Covenant. It really doesn't matter which kind of Phantoms you summon, although members of the Sunlight Covenant (Sunbros) are often considered more skilled and generally have experience with aiding other players.
By summoning allied Phantoms, you have already increased your chances of survival. Black Phantoms can only invade one at time so outnumbering them is a good way to kill them. Don't forget to use Estus Flasks when you have allied Phantoms as they cannot use theirs, but your Estus Flask will recover their health as well.
When you get the message that you are being invaded, don't go searching for the Black Phantom. Often, these invaders are skilled at PvP and will take every advantage they can, commonly lying in wait in areas that easily catch other players off guard. Rather, find a defensible location and wait there. Eventually, the Black Phantom will grow restless and start looking for you, which gives you the advantage.