As Kibbee said, it's simply a washer and nut threaded on the axle each side.
There is a few different thread sizes in use on inexpensive bikes - see this answer. You can run into a problem because two common thread sizes are very similar but not compatible.
3/8 inch x 24 tpi Some solid axle bikes, including coaster brake
3/8 inch x 26 tpi Solid rear axle
10mm x 1mm Most quick release rear axles
10mm x 26 tpi Rear axle, quick release, Campganolo®>
Note that the difference between 24 and 26 tpi is small and can be subtle, meaning that if you're using a spanner to do the nut up you can wreck the nut without really noticing that anything is wrong. The symptom is often that the nut strips before ever becoming tight. To avoid this put the nut on by hand until it is [completely on] the axle [thread]. If it still spins freely it is the right thread pitch.
It's best to go to a local bike repair shop to get the correct nuts. two washers and nuts are not expensive. Bear in mind you'll also have to make sure the nuts are done up tightly enough (which can be difficult if you don't have the proper wrench), tension the chain and align the wheel properly.