It depends on the kind of machine you have. But for a manual machine—the kind where you have to pull the shot—make sure you use fresh beans, clean your machine, and don't use hard or untreated water when making a shot of espresso.