Quick to prepare, yet tiny and powerful in the cup, espresso's a beloved way to make coffee that's also one of the finickiest. While the twists and turns of what makes each shot work—and what could go wrong—are many, they're not exactly the stuff of murky, crema-topped mystery. Ever wonder what's really going on back there, as you crane your neck around the bar to watch your drink get made?

We took a moment with Tamara Vigil, who works as an in-house educator for Irving Farm Coffee Roasters in New York City, and asked her to walk us through each part of making a successful espresso shot.

1. Dial in the Grind

Espresso requires a very fine grind of coffee, and too much variation in either direction towards coarseness or fineness can cause your shot to underextract or overextract. You're looking for a fineness that, to your hands, feels a bit like dusty sand, and Vigil suggests a barista do just that: feel the coffee.

"Does it feel soft and a little bit grainy?" she asks. If it's not in the sweet spot, she makes an adjustment to her grinder before doing anything else.

2. Measure and Dose

Espresso machines hold coffee grounds in what's called a portafilter—and the round metal part on the end is what's called its basket. Baskets can come in different sizes—the one we're working with today is a 21-gram basket. While it seems obvious that if you fill it with coffee, it holds 21 grams, it's actually more complicated than this. When she's starting out making espresso for a day, Vigil first grinds a set amount of coffee into a nice, clean portafilter, then weighs that portafilter (compared to its empty weight) on a gram scale.

"The scale is a tool we use to make sure that we're getting the same amount each time," said Vigil, who points out that the density of coffee changes frequently—as its environment changes, e.g. the humidity around it, or as the coffee itself ages and releases gases built up in roasting. You should expect a coffee to behave a bit differently each day you work with it, and since espresso by its intense nature magnifies every single thing (good or bad) in a coffee's flavor, you want to make your practices as consistent as possible to know how to get the results you want. By weighing the dispensed coffee to double-check, the barista can determine how long to run the grinder to get exactly the right amount of coffee in the portafilter basket.

3. Distribute and Tamp

Now that coffee's in the portafilter, we're still not ready. To ensure a shot of espresso extracts correctly, the barista has to do his or her best to make sure the coffee is evenly distributed within the portafilter. If there are places it's too tightly packed together and other places it's too loosely packed, water flowing through the bed of coffee will play favorites, and extract some particles too much, and others too little, resulting in a bad-tasting espresso.

The barista's first job to avoid this is to lightly tap the portafilter and make sure the grounds appear more or less even by sight. They may also manually distribute some of the grounds using their finger or another tool. This prepares for the coffee to be tightly compacted using the espresso tamper, which, if everything's done right, will eliminate any preferential treatment by water flowing through the bed of coffee.

4. Purge the Machine

An inelegant, but important next step is to momentarily "purge" the espresso group head—the place the barista will put their portafilter to actually pull the shot—by allowing a small squirt of water to run though before the portafilter is introduced. It's a quick check, says Vigil, to make sure the water is running clean and smoothly, and that there are no coffee grounds from the previous shot clinging to the group head that could impact the new shot of espresso.

5. Pull the Shot

Ground, dosed, tamped, and purged, we're ready to lock and load! The barista now clicks the portafilter into place and starts the shot. An initial, smaller surge of water from most machines will provide a pre-infusion stage, which primes the grounds for their time to shine. After this stage (which you won't see, as it all takes place inside the basket), the shot truly begins, with water being expressed through the bed of coffee grounds at high pressure, and the slow, viscous flow of espresso begins to flow downward out of the portafilter.

6. Watch the Shot Extract

A typical shot for Vigil and her trainees takes only 20-30 seconds with their house espresso blend. (In this demonstration, Vigil worked with a portafilter without spouts, so that we could better see the transitions the espresso moved through as the shot progressed.) "You watch for color, and you watch for the speed of the flow," says Vigil.

"In the beginning you should see some really thick, dark drips, and depending on how you want to brew your espresso it'll come out really slowly, or it'll just go drip drip and start to flow. It starts off dark and thick, and then it lightens up and will have tiger striping or woodgrain tones. You should see that dark chocolatey brown, a more tan color, and a nice creamy beige color," she explained.

"In the beginning you're getting those heavier flavor solubles, which are darker, and then towards the middle and the end you're getting more of the oils and the gasses that will rise to the top and become crema," Vigil said, explaining that she recommends stirring or swirling a shot of espresso before drinking so that the sweeter, heavier solids at the bottom of your cup mix together with the brighter, gassier components of espresso's top layer.

7. Clean it Out

It's good practice to clean up after oneself. Once the shot is complete, the barista removes the portafilter, dumps out the grounds, and runs water through the machine to again purge the group head.

8. Serve and Enjoy!

All the steps are complete except the most important one of all: present that beautiful espresso to its drinker, savoring the magic of all that is precision, hands-on care, and love, all summed up in a tiny little drink that'll be gone within seconds. Who's ready for another?

All products linked here have been independently selected by our editors. We may earn a commission on purchases, as described in our affiliate policy.