Ingrown hairs: we’ve all had them and freaked out about them — once I even thought an ingrown hair on my bikini line was an STI. But these pesky little red bumps, which often appear in unfortunate spots (ahem, bikini line, underarms…), are preventable and treatable.

So, what causes an ingrown hair in the first place?

An ingrown hair is a hair that has curled upon itself under the skin, says Dr. Adam Friedman, Associate Professor of Dermatology at the George Washington University School of Medicine and Health Sciences. They’re often caused by a genetic predilection for the hair to curve back into the skin right next to where the hair shaft exits on the skin (called the ostia) when it reaches a certain length.

Shaving can lead to ingrown hairs because razors can injure the skin around the hair follicle if you’re not shaving correctly, Friedman adds.

How to prevent ingrown hairs without embracing the full bush

In order to keep ingrowns at bay while shaving frequently, Friedman suggests only shaving after bathing and use a multi-bladed razor with a moisturizer bar to limit damage razors can cause to the skin. Remember: you’re aiming to get rid of your hair, not your skin.

In order to keep from developing too many ingrown hairs, be sure to exfoliate well so that the dead skin doesn’t sit on top of the hair, suggests Dr. Debra Jaliman, a dermatologist in New York City. Many people think ingrown hairs only happen after shaving certain areas, and while that’s not necessarily true, shaving dry, non-exfoliated areas covered in dead skin can definitely make you more susceptible.

“One thing that is very helpful is to use a shaving brush when shaving since it lifts the hair off the skin,” Jaliman says. “It’s also helpful to shave by the end of the shower when the hairs are hydrated.”

Friedman suggests looking for exfoliants with low concentrations of alpha hydroxy acids and beta hydroxy acids, which can help prevent excess skin from building up around the hair follicle, which further pushes the hair into neighboring skin. Shaving creams or soaps containing benzoyl peroxide can also be helpful to both prevent and treat ingrowns since benzoyl peroxide, best known for its acne-busting properties, can kill bacteria that can exacerbate ingrown hairs.

Oh no! You’ve got an ingrown hair, now what?

“While this hair is yours, your immune system doesn’t see it like this, and responds to it as though it were a splinter,” Friedman says. “As the hair pushes back through the skin, bacteria living on the skin’s surface come along for the ride, further stimulating the immune system, or even causing infection.”

Dr. Jaliman urges you to avoid the urge to self-treat, and says a doctor can remove an ingrown hair with a fairly simple procedure of cleaning the area with alcohol and removing the hair with very fine tweezers. The risk of any further infection is clearly lower at a doctor’s office than by trying to remove the hair on your own with dirty fingernails or tweezers you use on your brows.

Serious infections from ingrown hairs, while rare, are possible, and the more you pick at yours, the more the risk increases, so always see a doctor, who can treat an already infected area before it gets worse.

If a patient has a recurring problem with ingrowns, Friedman says dermatologists can prescribe a combination of an antimicrobial wash with a topical antibiotic and, in some cases, topical steroids to calm down the inflammation.

If your ingrown pops on its own (or you just can’t help yourself from trying to pop it yourself), let it drain — a warm compress could help — then wash gently with soap and water. Keep it covered with a bandaid for a few days in order to protect the open wound.

While ingrowns are almost always going to be annoying, they don’t have to be painful. Follow the tips above to ensure they never get worse than they have to.

Ashley Ross is a freelance writer in New York City who has written for The New York Times, TIME, Cosmopolitan, Marie Claire, SHAPE, Glamour.com and more. She's a former gymnast and a graduate of the University of Florida.