You're probably thinking of props, but I can think of three different categories this applies to. (I cover props last here.)
First is actual sets. Hello, Dolly, for example, had an elaborate turn-of-the-century New York City set. Butch Cassidy and the Sundance Kid was set to use that set for its own New York scene, but the studio balked at the last minute, wanting to preserve the secrecy of the Dolly set. (So we got the goofy postcard montage in BCatSK.)
Roger Corman reused sets (and everything) eight times to make what is now known as his "Poe Cycle". The eighth film, Tomb of Ligeia, was made, allegedly, because he realized he had a few days before the sets were finally torn down. (I don't know how this can be true given that it had the longest shooting schedule and the most complicated production of the eighth, but you can find that claim on the Internet.)
Another interesting case of this occurred when the Iron Curtain came down: Low-budget movie producers rushed to places like Romania to use movie sets that would otherwise fall in to disuse. Hence you get oddly lovely low-budget films such as Dark Angel: The Ascent and the Subspecies and Trancers series.
Some sets also just act as locations. The Warner Bros. lot, e.g., has a "western set". You've seen it a million times. "Gotham" and "Central City" from the '90s Batman and Flash shoots are repurposed as the exterior of the hospital in "ER", across the street from which is a small park with a pagoda used in "Music Man", "Sgt. Pepper's Lonely Hearts Club Band" and a zillion other things. [source]
(If it's not clear why I added "locations" here, it's because a lot of once famous and well-used locations are now gone, because the space was considered more valuable for offices or otherwise repurposed.)
Second is portable sets, typically interiors. Sitcoms, especially when filmed before a "live studio audience", have to have sets that can be put up and struck on a seasonal basis, if not a weekly basis. These are just facades, so from what I've seen, they're just lifted up on to wheels and rolled off when not needed. They're then stored and re-used until they become too old-fashioned (or iconic) to reuse.
For example, Central Perk was struck when "Friends" ended, and they had to recreated it for a...well, I guess you'd say they had to recreate it to cash in on "Friends" fanatics.
Lastly, there are props. Props can be stored by the studio (or third party company like an FX studio), discarded, or kept, awarded or stolen by members of the cast & crew.
It is said that "Robbie The Robot" was so expensive that MGM was loathe to throw it out. But Robbie was so distinctive and famous, they couldn't really put him in another major picture, so they put him in The Invisible Boy, TV shows like "Columbo" and "The Twilight Zone". The original prop has been retired for decades.
Interesting topical coincidence: Robby is now in the possession of horror schlockmeister William Malone, who is credited (in Wikipedia) with the creation of another, more elusive, iconic film prop: The Michael Meyer's mask from Halloween I and II.
In Halloween's case, they actually burned two of the three masks. The only surviving mask is said to be privately owned.
It used to be a lot more common that props were just plain thrown out. For every pair of ruby slippers or gingham dress, there are thousands of plywood, cardboard or modified toy/tool props that nobody figured would be valuable. Take "The Trouble With Tribbles". The original 500 tribbles cost 70 cents each, and now sell for around $1,000. The repeat of this sort of thing over time has meant that production companies are rather more possessive and cast & crew have to be more creative when it comes to stealing props.
Lastly, the more mundane items associated with less-than-iconic shows are simply sold off. I was driving around in The Valley a few years ago and came across a store full of furniture, clothing, paintings and various other bric-a-brac that had all been used on sets. There was nothing very intrinsically interesting about the items, where there might have been had they had attached histories.
Which I suppose could be a business opportunity for someone in the biz.