The answer to your question is, it depends.
Between .40 and .357 Sig, all you have to do is change barrels. A lot of people who like .357 Sig as a defense round, buy a Glock in that caliber and then buy a .40 barrel so they can shoot cheaper/easier-to-find .40 for all or most of their range time.
I have read that there are conversions available between 9mm and .40, but I don't know all the details. Obviously, the barrel has to change. I believe it also entails changing mags and recoil springs. I don't know about the slides.
I'm sure someone will be along shortly to fill in the blanks.
"An armed society is a polite society." Robert A. Heinlein
"After a shooting spree, they always want to take the guns away from the people who didn't do it. I sure as hell wouldn't want to live in a society where the only people allowed guns are the police and the military."
William S. Burroughs