Clamp the bar of the chainsaw (the part the chain fits over) into a vice. Do not clamp the chain. Lock the chain in place.
Clamp the file guide to the bar of the chainsaw. This keeps the file above the cutting plate.
Hold the guide parallel to the chain as you file along the angle indicated for your chain. This angle is sometimes marked on the rear edge of the top plate of the chain. You know you have the correct angle if, when you insert the file into the guide, the file lines up with the grooves of the teeth.
File the teeth five to 10 times, depending on how worn the cutters (the teeth of the chain) are. Move the file guide along the chain to sharpen the other cutters. Release the chain lock to move the chain once you've finished sharpening all of the exposed chain.
Turn the saw around and sharpen the other side.