If a TV has a VGA input port, then plugging a VGA cable into it allows it to send a computer video signal from the computer to the TV. Not all televisions have VGA ports on them. Instead, many have HDMI or other input ports.
VGA is a method of transmitting a video signal used by computers. Unlike the more modern HDMI port, VGA ports only transmit video, not audio. To transmit video with audio from a computer to a TV using a VGA cable also requires the use of an audio cable. If a TV does not have a VGA port but has an HDMI port, a VGA to HDMI adapter can translate the VGA input into an HDMI output.