When you buy an A2 stock kit, this is generally what it will look like. The long black part is the buffer tube, the long spring is the recoil spring, and the gray widget attached to it is the recoil buffer. There are also a variety of springs and detents, as well as a rear takedown pin, involved in this as well.
First, separate the buffer tube and align it with the rear of the receiver. You will be screwing it part of the way in, but not all of the way.
As this image shows, you should stop it right before it's about to cover the buffer detent's hole in the rear of the threaded part of the receiver.
This is the buffer detent and spring. You'll installation easiest if you put the spring into the hole, then the detent.
This is the detent, installed into its appropriate hole. You'll note the stub sticking up from the detent. The shoulder around the stub remains beneath the buffer tube - the buffer tube actually captures the detent and keeps it from bouncing back up out of the receiver. The stub itself sticks up a bit past the buffer tube, and serves to retain the recoil buffer so that it doesn't simply get pushed into the action of the weapon by the spring.
Press down on the detent with your thumb (or, if you have a low pain threshold or don't feel the need to prove yourself... put something else on top of it), then screw the buffer tube in the next few turns until snug. The buffer tube should stop securely just short of the stub on the buffer detent.
This is how it should look once you're done.
Notice the small, black hole just underneath and to the right of the buffer tube. This is the hole you're going to drop the detent and spring into a couple of steps later.
This is the insertion of the rear pivot pin. Note the location of the groove - it should point directly to the back of the rifle. Remember that hole I mentioned in the previous step? The detent pin will be put through that, and will reside in that groove.
In this picture, the detent pin has been halfway inserted into the hole.
Next, put the long detent spring into the hole after the detent.
Your rifle should now look like this - you are ready to slide the buttstock on over the buffer tube.
If your stock came with a black plastic spacer, drop it down into the hole in the stock, then put the buffer tube down the same hole. If the lip of the buffer tube can't rest flush against the stock, then you don't want the spacer down there. If it can, then leave it in place to eliminate some play between the screw and the buffer tube. At any rate, slidet the stock down over the tube until the stock is flush with the receiver. Make sure that the spring is lined up with the corresponding hole in your stock, as you don't want to crush/mangle the spring during this process.
A closeup of how things should look when they're properly aligned. Note the gray protrusion coming out from the stock at the bottom, which fits into a matching hole in the receiver. Now, some receivers have oversized holes, and this can result in buttstocks that want to shift back and forth. I personally cram a few rubber O-rings into this hole if the receiver/stock connection is too loose for my taste.
You're now ready to install the buttstock screw. It goes into the hole in the top of the buttstock. This particular screw isn't exactly an ordinary machine screw.
As you'll note, there's a hole which goes all the way through it. This is to allow air, water, etc to escape the rifle instead of being trapped within it. Without this hole, the buffer tube would functionally become a pneumatic piston, compressing the air and not letting it out. Chances are that it would add enough resistance on the rearward motion to cause malfunctions. Also note the red material towards the bottom of the screw. I've been told that it's nylon, and I've been told that it's red loctite. Either way, it makes the screw really tough to turn towards the end, which means you need a large screwdriver. See the "Preparation" section if you think you can get by with a screwdriver that's not big enough. Now, you can get by with the screwdriver point on the top of an AR-15 armorer's wrench, but it's really the very minimum size you could possibly use for this. You'll be much better off with a large-bladed, flat head screwdriver.
The same screw, viewed from the top.
Tighten the screw until the tube fits snugly to the receiver, taking great care not to slip and strip the screw head. You'll note that the upper buttstock screw needs to be REALLY tight before the buttstock is firmly seated.
Assuming that you've got the buttstock on there nice and firm, this is the part where you put the buffer into the recoil spring, and then put the spring down into the buffer tube. If the hammer isn't already cocked, then cock it before you try to put the spring in. The spring goes first, as in this image.
Keep pushing until the buffer goes past the stub on the buffer detent and locks into place.
The completed rifle should look more or less like this, with everything installed.