Difference between "slacks", "pants", and "trousers"?
An excert from here:
Slacks implies pants of certain materials which are not part of a suit (jeans are not slacks, and you would not refer to the pair of trousers that came with a suit as "slacks".) It is also more common to use "slacks" to refer to pants worn by women, while men would wear "trousers". Meanwhile, "pants" could refer to slacks, or trousers, or jeans, or just about any form of two-legged outer garment for the lower body.
Note that in AE, "pants" by itself is never understood to mean underwear of any kind, and must be altered in some form (either as "underpants" or as "panties") to have that meaning.
Bill: What's this I hear that the boss walked into your office while you were changing your clothes and caught you in your underwear? Tom: No, but she nearly caught me in my underwear; luckily, I had just put my pants on.
This is an AE perspective but, I would say that trousers and pants are synonyms. With both being any outer garment that covers both legs separately and goes from waist to ankles. Technically slacks is also a synonym, but the informal definition I most frequently hear is that slacks = dress pants. I.E. Pants that you might wear if you were trying to look nice.
I know the question is tagged AmE - but that wasn't in the original, and hasn't (yet) been confirmed by OP, so I don't see anything wrong with answering from a BrE perspective.
In the UK, pants almost always means underpants. And as OED says, slacks are loosely-cut trousers for informal wear, esp. those worn by women.
I think for many Americans, pants and trousers are effectively synonyms. But so far as I'm aware, "esp. those worn by women" tends to apply to slacks on both sides of the Atlantic.
An AE perspective:
pants - The broadest term used for any full length two legged covering, male or female; covers both hard work clothes (jeans), casual (chinos, ducks, khakis, etc.) and dress outfits (suits, office wear, evening wear, even tuxedos). This is probably the most common term in general use. (See ngram below which is probably book references only)
slacks - The next fairly broad term, covering all but work clothes or jeans. Women's dressier pants are often called slacks. Probably least used overall and more for women's clothing.
trousers - Usually only used for dressier clothes, such as suit pants or finer pants often worn with a sports jacket, blazer or a dressier shirt. Usually reserved for men's clothing, with the possible exception of women's pants suits.