VCR and Cable Signals
VCRs are essentially their own little TV stations. Almost all VCRs have a switch on the back that allows you to select channel 3 or 4. The video tape contains a composite video signal and a separate sound signal. The VCR has a circuit inside that takes the video and sound signals off the tape and turns them into a signal that, to the TV, looks just like the broadcast signal for channel 3 or 4.
The cable in cable TV contains a large number of channels that are transmitted on the cable. Your cable provider could simply modulate the different cable-TV programs onto all of the normal frequencies and transmit that to your house via the cable; then, the tuner in your TV would accept the signal and you would not need a cable box. Unfortunately, that approach would make theft of cable services very easy, so the signals are encoded in funny ways. The set-top box is a decoder. You select the channel on it, it decodes the right signal and then does the same thing a VCR does to transmit the signal to the TV on channel 3 or 4.