1) So, you've been out shooting with your muzzleloading rifle for the first time, you've got it home and you've got to clean it. The first important rule is to clean your gun right away. Black powder is "hydroscopic", which is to say that fouled or otherwise, it draws moisture from the air at a rate that can become destructive to your gun more quickly than you would expect. As you certainly don't want the inside of your barrel to rust, you'd better get to work cleaning that gun as soon as you get home. I will advise you as follows here: Try not to look upon cleanup as a chore. Think of it as part of your muzzleloading routine. Maybe this is the time for that beer you've been thinking about all day, or the time to listen to a little talk radio in the backyard.
2) If at all possible, take this job outside. Burned black powder smells like eggs so if you clean your gun indoors, your wife's going to yell at you and, when the truth be told, you aren't going to enjoy the smell much either.
3) If you've got a "hooked breech" rifle such as a "Hawken" type replica, you've got an easy job on your hands. Knock out the "wedges" or "barrel keys" and pop your barrel out of the gun.
4) Use your nipple wrench and unscrew the nipple from your rifle. (Some will disagree with this procedure but I abide by it.)
5) Wrap an old "T Shirt" or towel or whatever around your barrel and stand the barrel upright, muzzle facing upward. Using a watering can, pour some very hot water down the barrel. Fill the barrel to the top and allow the water to run out of the hole where your nipple was. (Note: You'd be surprised how hot that barrel will get if that water was hot enough!)
6) Get yourself a dry cleaning patch and put some dish washing detergent on it. Run that patch up and down the barrel a few times using your ramrod and cleaning jag.
7) Run some more hot water through your barrel.
8) Repeat the soapy patch procedure.
9) Repeat the hot water procedure.
10) Continue this until you can run a couple of dry patches down the barrel and they'll come up clean. Use an old toothbrush to clean crevasses, like the hole you'll set your nipple in.
11) Run a couple of patches pretty well soaked in WD40 up and down your barrel. Squirt a bit of WD40 here and there, like in the hole where your nipple will sit. If you are cleaning your gun for long term storage, like for a couple of months, use straight 30 weight motor oil instead of WD 40. (Note: Some will disagree with the use of petroleum based products in a muzzleloader. My old guns are in perfect condition and I use oil liberally. So does Hershell House, one of America's greatest custom rifle builders. If petroleum is good enough for Hershell, it's good enough for me.)
12) Clean your nipple out using hot water, the toothbrush, and a pipe cleaner, then oil it up and screw it back into the barrel tightly.
13) Using some water and a dry rag, clean your frizzen, the pan, and the area of your barrel around the touch hole if you were shooting flintlock, or your hammer, if you were shooting percussion. When it's nice and clean, oil it up.
14) You won't have to unscrew your lock every time you shoot but you'll want to do it once in awhile and certainly before you put the gun away for the winter. Unscrew it by removing the screw by the back plate, look for fouling, clean it up, and oil it using your 30 weight motor oil.
15) Be sure the outside of your barrel is well oiled and put the gun away.
16) If you haven't been shooting a rifle with a barrel that can be popped out easily because it's been held in by a key or two or three, follow the procedure offered above WITHOUT REMOVING YOUR BARREL. For example, set the butt of your rifle in an old chair, outside, with the touch hole or the nipple hole pointing downward. Pour hot water right in the barrel and run it through, etc. Be sure to remove any excess water. Be careful about letting water run between your stock and your barrel. If running water right down the barrel of a gun that is still in it's stock makes you nervous, use very wet cleaning patches followed by soapy patches instead.
17) Pack your gun away and run an oily patch down the barrel every month or so.