The American Academy of Pediatrics recommends exclusive breastfeeding for about six months of life when possible. Breast milk is the perfect source of nutrition and contains mom-made infection-fighting agents that protect babies against infection. At six months, the AAP recommends continued breastfeeding for one year or longer as complementary solid foods are introduced.

But learning how to breastfeed can be an extremely frustrating process for moms. Getting the basics right can set you, and your baby, up for breastfeeding success.

Here's what you need to know.

1. How to tell if your baby is hungry

One of the first ways your baby communicates with you is by displaying “hunger cues." We all know that a crying baby may be hungry, but if you pay attention you can pick up on more subtle “hunger cues” before they start bawling!

When a baby smacks his or her lips, sticks the tongue out, brings fists to mouth and turns their head side to side they are letting you know that they are ready to be fed.

2. Prep

Especially when just starting to breastfeed it's important that your environment is calm, quiet and comfortable. You should be in a space where you feel comfortable.

Your seat should have good back support and any support pillows you plan to use should be within arm's reach.

Sometimes babies get too cozy when breastfeeding and start to drift off to sleep after a minute or two feeding. To prevent your baby from getting "milk drunk" and falling off the breast too early, you can strip them down to their diaper before a feed.

If your baby is in the middle of a crying fit, try to comfort them and calm them down before you attempt to feed.

3. Take a cuddle break

Hold your baby skin to skin between your breasts. Skin to skin contact is a wonderful way to bond with your baby and who doesn’t love a cuddle? But it also helps promote milk production.

Once your baby is situated on your chest, observe him or her. Is your baby's head bobbing? Is you baby showing other hunger cues on your chest? If so, great!

Time to master the hold.

4. Breastfeeding holds

These are two of the tried and tested favorite breastfeeding holds of moms everywhere.

PHOTO: Cross-cradle hold: This hold is an excellent starting point for new moms and a great way to support your baby's latch.
Cross-cradle hold: This hold is an excellent starting point for new moms and a great way to support your baby's latch.

This hold is an excellent starting point for new moms and a great way to support your baby’s latch.

Hold baby's head at your right breast and baby's body toward your left side. Baby’s tummy should be nestled up against yours. Your left hand should be behind your baby's ears and neck with your forearm supporting your babies back. A pillow can be placed underneath the left arm to support mom’s arm. Hold your right breast with your right hand as if you are squeezing a sandwich and direct the nipple toward the baby’s mouth to help the latch.

PHOTO: Clutch or 'football' hold: This hold is ideal for those recovering from a C-section as it keeps the baby's weight off your belly.
Clutch or 'football' hold: This hold is ideal for those recovering from a C-section as it keeps the baby's weight off your belly.

This hold is ideal for those recovering from a C-section or have a larger chest as it keeps the baby's weight off your belly.

Cradle baby by your right side, level with your waist. Support your baby’s head with your right hand, baby’s mouth facing toward the front of the right breast and near the nipple. Baby’s back will rest on your forearm -- think Tom Brady clutching a football under his arm.

A pillow underneath the right arm can help support the baby’s weight and prevent arm aches.

Use your left hand to cup right breast so you help direct nipple to baby’s mouth and support latch.

5. All about the latch

Ah, the latch. This can be the toughest hurdle breastfeeding moms need to overcome. The main thing we want to see is baby’s mouth open wide, tongue over bottom gum and as you bring them toward breast for their chin to be the first thing that makes contact with your breast when baby is latching on.

You can encourage the baby’s mouth to open wide by brushing the nipple gently against the baby’s upper lip.

For new moms it can be hard to get a sense of how much nipple and areola (the pigmented skin that surrounds the nipple), a baby should take into their mouth when latching on. It's helpful to remember that when breastfeeding your nipple should be positioned against the roof and toward the back of the baby's mouth. They should have a good portion of areola in their mouth.

6. Still having trouble?

If you continue to have trouble breastfeeding, you can always reach out to your doctor or a lactation consultant. Find a lactation consultant near you here.

Three of the most common breastfeeding problems encountered by new mom are pain, difficulty latching and milk production.

Problem 1: Breastfeeding hurts!

The most common cause of breastfeeding pain is that your baby is not latching correctly. See “latch” information above.

Another common cause of pain is nipple soreness. To combat nipple soreness after breastfeeding, wipe damaged nipples gently with moist cotton wool to remove any debris and then let nipples air dry. This helps to prevent infection. Once the nipples are dry, a lanolin cream or a few drops of breast milk can be applied on the nipples. Cooling packs also can provide comfort.

Another tip: Breast shells can also be worn to prevent sore nipples chaffing against clothing between feedings.

Problem 2: My baby still isn't latching correctly.

There are lots of different reasons your baby may not be latching correctly.

Frequently when moms complain of poor latching, they are describing nipple feeding. This is where a baby is just sucking on the tip of the nipple at the front of their mouth and not taking enough nipple and areola into their mouth.

If baby gets too fussy or too tired, he or she will not cooperate with your best efforts to feed them. The best time to feed baby is when they are quiet with their eyes open.

Around 10% of women have inverted nipples. This isn’t a problem for most babies, but some can have difficulty. You can wear nipple formers in between feeds to help inverted nipple protrude more, making it easier for baby to feed.

Problem 3: I don't think I'm making enough milk?

The most important advice we can give a mom struggling to produce enough milk is that you need to take care of yourself first.

Two weeks after the baby is born, your only job should be to rest, eat and feed baby. Enlist you partner, family and friends to help around the house. Holding baby skin to skin can also help with milk supply. If you need to be at work and are pumping, keeping a picture of baby with you along with a scent cloth can help milk production.

It’s good to keep in mind that when a baby is first born their stomach is only the size of a marble. The first milk you produce, called colostrum, is designed to provide adequate nutrition. It's so nutritious it’s nicknamed “liquid gold" and a little goes a long way.

7. How do I know my baby is getting enough milk?

The best way to assess if a baby is getting enough milk is by closely tracking their weight gain with their pediatrician.

However, if your baby is making less than six wet diapers a day, it may be a sign they may be not receiving enough milk and may need to be seen by a doctor.

8. What if this doesn’t work for me and my baby?

Don’t panic, there is help out there!

There can be many, many reasons that breastfeeding doesn’t work out or that a mother will decide that it isn’t the right choice for her family.

Not breastfeeding your baby means nothing about you as a mother or the bond you share with your baby.

You can also always contact your baby’s doctor or seek help from a lactation consultant.

Dr. Áine Cooke, a senior pediatric resident at Washington University in St. Louis, is an ABC News Medical Unit Intern.