First off, this technique is only good if you need to replace a rim. Also, it will only work of you are replacing the rim on your wheel with the same diameter rim. You won't be able to put a 26 inch rim on an old spoke and hub set up for a 700 bicycle wheel.
Now that we got that out of the way, on with the show.
For the benefit of this post, I will switch rims from alloy to steel for a cruiser project. What you need is your bicycle wheel, a replacement rim of the same diameter, spoke key wrench and some masking tape. Make sure that you are replacing your rim with a straight one. A bent rim will only provide you with more reasons to curse. You can easily check this by laying the rim on a flat surface and any bends will magically be revealed.
Next, take the new rim and tape it to the old one. Now you must match the two rims together. This means that the valve holes must be aligned with each other and the sides of the spokes as well, ie a left spoke hole matches a left spoke and a right spoke hole matches a right spoke, etc...
Now start removing the spokes from the old rim and transfer them to the new rim one at a time. Don't screw the spoke nipples tight on the new rim, we just need them to hold in place.
Once all the spokes have been transferred to the new rim, remove the tape and the old rim. Voila! You have just built a new bicycle wheel the lazy and easy way.
Take your newly rebuilt bicycle wheel and screw all the brass nipples until you can't see the thread on the spokes. If you know how to true a bike wheel, now is the time to put it in the stand and true it. Tension will be put in the wheel after this initial truing and you'll top it off with a final true after that. For those of you who can't, you can go to my article with a video on the subject listed at the bottom or you can bring in your wheel to your local bike shop for final truing. Hopefully you will save some bucks since they didn't have to build it for you.