Your basic bicycle hub is simple yet complex:

At each end there are bearings, either loose balls or a set of balls in a "cage". They fit into the "cup" recess in the end of the hub body, then the "cone" is screwed onto the axle shaft to hold everything together. A "lock nut" tightens against the cone to keep things from working apart. (Note that this lock nut is different from the nut used to secure the axle to the frame.)
Adjusting an axle involves screwing one of the cones in or out as needed to achieve smooth motion with neither looseness nor a sort of drag and rough feeling (when the axle is spun by hand). Then the lock nut must be tightened against the cone.
In order to do this adjustment one needs a "cone wrench", an inexpensive, non-adjustable open-end wrench that is very thin. These are available online or from any bike shop that sells tools. (Alas, there are several sizes, and you need to find the right size for your axle.) The cone wrench must be used to hold the cone while the lock nut is tightened against it.
This adjustment is apt to take 3-4 tries to get it right the first time -- the cone must be very slightly loose before the lock nut is tightened, as doing so pushes the cone in slightly.