Removing the barrel from the frame requires a vise, clamping blocks to hold the barrel in the vise jaws, and a special wrench to turn the frame off the barrel. On older guns with the pinned barrel, the pin will have to be driven out first.
New barrels for S&W revolvers are not drop-in parts; they must be fitted to the frame for proper indexing, the cylinder gap set, and the forcing cone cut.
This is something that should be left to a competent gunsmith with the right tools. Doing it wrong runs the risk of bending or cracking the frame.