Trousers are what you wear on the farm. Slacks are what you wear in the office. Pants are what you wear everywhere else.
The above is a mindfact, probably.
Pants are the superset of everything that you wear that stretches from your waist down to cover your giblets.
They can be jeans, jorts, shorts, trousers, chinos, etc - all of which are pants.