Normally exposure is reciprocal: half the time with twice the light gives the same result. For very long (and very short) exposures, film stops following that rule, so the picture comes out darker than metered.
Datasheets give a correction table. Kodak's Tri-X sheet, for example, says to add one stop at 1 second, two stops at 10 seconds and three stops at 100 seconds, and to shorten development a little. Every film behaves differently, so use the table for your film.
Colour films can also shift in colour during long exposures, which some datasheets correct with a filter.
The reciprocity calculator works out the corrected time for any film with a table.