pumping and breastfeeding

Cheyenne
Any mommies do both!? I'm going to this is my first baby and I'm curios as to how both is going to work! How do I know when to pump when I'm not breastfeeding? And how do I keep from getting mastitis? Details will help!!