It's even easier if you have an auto-exposure camera, since it does it for you automatically. You don't have to do a thing, except attach the filter. The camera's exposure meter reads the amount of light coming through it and adjusts exposure automatically. If you have a manual camera, simply refer to the spec sheet that came with the filter when you purchased it to learn its filter factor, and change exposure in accordance with it. Thought you'd never ask.
Filters have different densities.
A very dense filter absorbs more light than a less-dense filter. The necessary adjustment is termed a filter factor, and tells the filter-user how much to increase exposure. A primary use of filters in color photography is in reproducing colors that match as closely as possible to the actual colors in a scene. Certain types of light may cause film to have a color cast that the human eye doesn't notice in the scene because our eyes adjust and compensate for different types of light, but film doesn't. Filtration can be used to color-correct the light before it strikes the film.