Turn off the water to your tub by shutting the home's main water line near the water heater.
Remove the handle from the tub by rotating the base of the handle, the portion below the lever handle, counterclockwise and lifting the entire part off the base of the tub.
Unscrew the cartridge, which is the part under the handle, by gripping the top with a pair of pliers and rotating it away from the spout. Lift this part out once the base is completely un-threaded. Each cartridge rotates towards the spout to install and away from the spout for removal.
Insert a new cartridge into the base of the faucet to replace the one you just removed. Rotate it towards the spout to thread and install it. Replace the handle base by fitting it over the top of the cartridge. The stem of the cartridge, or the part on top, fits into the bottom of the lever handle.
Rotate the base of the handle clockwise to install it properly. Replace the top cap on the handle if necessary, by inserting it into the top hole of the handle. Turn on the water and use the faucet.