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.