I had a plumbing problem needing to be addressed (people: stop mixing copper with cast iron piping!) and learned how to sweat (solder) copper piping. Why do they call it sweating instead of soldering? I have no idea, since I'm not a plumber, but I've done a decent enough job at sweating the copper that I have no leaks in my basement (anymore).
I don't know everything, as you'll see I'm a little short on details, good tips, good practices, background info, or plumbing code (did I mention I'm not a plumber). But hopefully it's good enough to get you started on your next project. Have fun!
Step 1: Start With a Freshly Cut Copper Pipe.
Depending how bad you cut the pipe (the best thing I had at the time was an angle grinder), you'll end up with a crappy looking end with burrs.
Step 2: Deburr the Pipe End.
I used the angle grinder to remove the burrs on the outside of the pipe, and then used a multi-step drill bit to remove the burrs on the inside.
Step 3: Sand the Outside
Use some plumbers fabric to clean the outside of the pipe. You could try sandpaper, but the plumbers fabric is really abrasive, works well, and it's cheap.
Step 4: Ream the Inside.
Ream the inside of the pipe with a pipe cleaner. Make sure you buy the appropriately sized cleaner for your pipe.
Step 5: Apply Flux
Buy a flux on the with a wide temperature range, especially if you're a newbie like me. I used the Oatey No.95 flux. Apply it on the outside of the pipe. Non-disclaimer: I am not affiliated with Oatey by any means.
Step 6: Install Fitting, Then Apply Heat and Solder :)
Finally, the fun part (the part with fire).
After installing the fitting (note: ream the fitting with a pipe cleaner too!), start applying heat. Move the torch around to "evenly" heat the mating area. After a subjectively short amount of time, try applying the solder to pipe. Don't just put the solder in the flame for it to melt, you want the pipe to melt the solder.
Once the solder melts around the joint and starts pool at the bottom, you're finished (it takes very little solder to do this). Do a quick check around pipe to make sure solder flowed all around it.
After it's cooled, clean off the leftover flux with soap and water. Then hope you have no leaks.