Its fiction that features the struggles of a central, self-reliant fantasy protagonist (or more rarely, a pair of them) against the backdrop of an exotic and fantastic world.
The protagonist is the Swords part. The Spires part is the fantastic and exotic world they inhabit. Both parts must be vivid and both have to be front-and-center of the story, or it doesn't qualify.
Barsoom is a poster child for Swords & Spires, as is Howard's Hyboria.
Tanith Lee's Storm Lord and Birthgrave series are 110% Sw&Sp.
So is Andre Norton's Witch World, and Leigh Brackett's Eric John Stark and most any of her short stories. Clark Ashton Smith is, and Vance's Dying Earth, and MZB's Darkover books.
Zelazny's Amber is Sw&Sp, as is Harrison's Viriconium. Almost all of Moorcock is.
Dune is. Tolkien isn't.
Gemmel and Asimov aren't. Heinlein isn't. Leiber's Nehwon is, but his scifi isn't.
I use the term Swords & Spires because I often want a way to talk or think about these kind of stories as if they're the same thing. I can't do that using existing genre labels without a lot of qualifications.
To be clear, I don't have any problem with existing genre and subgenre labels. I mostly find genre labels useful or at the very least harmless. I just like to use the term Swords & Spires because
a) this type of fiction is spread across a number of different genres
b) those genres also include** a lot of other kinds of story that don't have the qualities I'm talking about
** usually. Sword-and-planet is the one exception I can think of.