The cursor on the CGA, MDA, EGA, and VGA cards was a hardware sprite
generated on the earlier cards by the 6845 video controller, and on later
cards by a chip that emulates the 6845. That chip has an address counter
that is used to fetch data from memory, as well as a line counter and a
cursor-state latch. It also has a programmable registers for cursor address, cursor start line, cursor end line, and blink pattern.
Every time the display controller advances to line N of a character row,
it compares N against the cursor-start and cursor-end registers. If it
matches the former, it sets the cursor-state latch; if it matches the latter, it clears the latch. At all other times, the latch keeps its state. If the cursor is programmed to be active in rows 10-13 of each character, this signal will be active while drawing rows 10-13 of every character line.
Any time this latch is set, the value in an internal 5-bit frame counter matches the requirements of the blink pattern, and the display is fetching data from the programmed cursor address, the 6845 chip will output a "cursor" signal. The CGA and MDA will then filter this signal with a redundant (worse than useless) blink circuit. Whenever the filtered signal is high, the CGA or MDA will ignore the bit pattern of the character being displayed and unconditionally display the foreground color. The cursor has no effect upon anything stored in memory, and because of the CGA's redundant blink circuit there's not even any way for software to tell whether it's visible at any moment in time.