Refers to short pants, such as athletic shorts or casual summer shorts.
In summer I always wear shorts.
She put on athletic shorts and went out for a jog.
Refers to women's underpants. Often used in compound terms like サニタリーショーツ (sanitary shorts).
I bought new panties.
In summer, the kids run around the park in just their shorts.
長ズボン (full-length trousers) is the opposite of ショーツ when ショーツ means short pants.
パンツ can mean either 'trousers' or 'underpants' depending on context, so learners often confuse it with ショーツ, which is limited to 'shorts' or specifically 'women's panties'.
ショーツ, being a thin flat garment, is typically counted with 枚 as in one pair of panties or shorts.
Loanword from English 'shorts'.