A color map (often called a color table or a palette) is an array of colors used to map pixel data (represented as indexes into the color table) to the actual color values.
Some graphic displays, especially older ones, cannot show an arbitrary color for every pixel. Instead, each pixel is stored as a small number that's used as an index into the color table.
For example, it was common for VGA, in some modes, to be able to display up to 256 unique colors at one time. But since the screen had many more than 256 pixels, you couldn't set an arbitrary RGB value for each of them. Instead, you'd store a single byte per pixel, which would be used to look up the actual color in the color table.
Color tables are less relevant today, but some graphics file formats still represent as a color table and pixel data the consists of indexes into the table, rather than directly encoding the pixels as colors in some colorspace, like RGB. So if you write code to deal directly with these formats, you'll have to understand how color tables work.
If you work in embedded systems, you might encounter a limited display that still uses a color table. Xlib, the Windows API, and other graphics APIs still have functions for dealing with systems that have a limited color table, though I doubt many programmers use them nowadays.