A font, combined with some mechanisms that don't vary from font to font (such as Unicode normalization and low-level drawing), is in its general form a program that produces a raster image from a string (i.e. a sequence of codepoints representing characters), given parameters like point size and choice of variant glyphs.
Sometimes this general operation is simplified, most commonly by rendering individual characters (giving up kerning, ligatures, contextual alternates etc.), caching results (giving up random glyph variations and contextual influences), producing vector outlines (giving up hinting).
The simplest types of fonts and font rendering systems, such as those for fixed-width terminals, directly map individual code points to constant bitmap glyphs, but it's only a degenerate form of a more complex process.