For the home market, TVs were often used because of their easy availability: most households already had one, and the image was often good enough for the low resolution of early machines. Professional users would often buy a purpose-made computer monitor, which would become essential as display resolutions increased and computers entered the GUI era.
I'll concentrate on dedicated computer monitors, as other answers have already given good explanations of the connections available on TVs of the retro era.
In the early 1980s, a high-quality colour monitor would use an input with separate RGB pins, and potentially an Intensity pin. These inputs would be driven at TTL voltages, giving 2^3=8 or 2^4=16 colours onscreen (similar to CGA/EGA displays for IBM-compatibles). The physical connector itself would be manufacturer-dependent, but was often a DIN 41524 socket. Here is an example of a Microvitec CUB monitor using a 6-pin socket for TTL video:
Other manufacturers, such as Philips(*1), used an 8-pin DIN socket. There was little standardisation of the pinout for either of these connectors, just like there was no standard connector on the computer end. The usual advice for customers was to "ask your dealer" if they had a suitable cable, or if they could make one for you. (A benefit of using off-the-shelf DIN connectors.)
High resolution monochrome monitors would typically use a phono (RCA) or BNC connector. Some monitors supported more than one type of input.
As computers started to use non-TTL (i.e. linear or analogue) RGB colour, manufacturers could support both by adding a second connector on the rear of the monitor. At first this was done with a second DIN connector, but as the SCART standard (which supported analogue RGB) became popular in Europe, they too were used. Here's the back of a Phillips CM8833, which supports monochrome/composite video (Input I) as well as TTL RGB via DIN connector or analogue RGB via SCART:
The use of DIN connectors for video fell out of fashion after the end of the 8-bit era, with D-sub connectors becoming more prevalent. Philips released a revised CM8833-II which replaced the DIN and SCART connectors with a single DE-9 connector, with a toggle switch to select analogue or TTL input levels.
SCART and RCA composite connectors were also found on contemporary TVs, but DIN and D-sub connectors were rare or non-existent. DE-15 (VGA) connectors didn't become common until TVs had switched over to LCD displays, which takes us beyond the "retro" era.
- Philips also made OEM monitors on behalf of a number of computer manufacturers, including Acorn and Commodore.