I'm guessing the problem is the baby "hanging on" for long periods of time. Babies suck for comfort -- if you don't object to pacifiers one might help.
You can't prevent it. If your baby is nursing, he/she either needs the nutrition, needs the comfort, or both. Newborns especially often nurse for hours. Don't try to stop it!
Sometimes babys like to use the breast as a pacifier, it is where they are comfortable. Give the baby a paci, they will let you know when they are hungry.