I was watching Ed Sullivan show and notice the had a background of a guitar with the singer in front. I am sorry but the closest picture I could find of what I am is of a Lassie overlay.
I know they would do this on live TV. But how?
Quite a range of specific technologies would have been used, depending on the era and application. The Lassie title, for example, was probably done on film, and would have been a bit different from what would be done on a live broadcast.
For doing live analog video without any digital equipment, you basically need two perfectly synchronized video streams. Sync is still hugely important in a lot of broadcast contexts, but it really mattered with analog. Basically, a TV studio would have a master signal generator, which would send out sync pulses. Cables would run from the MSG to all the important equipment in the studios, such as the three main cameras in a "standard" 3 camera TV studio setup, but also any other picture source such as a tape playback machine, or a camera set up for credits. With this technology in place, you can use a video switcher to switch between two cameras and have a clean cut. If you have ever channel surfed with an analog TV, you will sometimes see the picture "jump" when you flip between two channels. That's because the two stations weren't mutually in sync. (Which is basically impossible.)
Now, once you have the pictures synced between all your sources so that you can cut cleanly between them to switch between cameras or whatever, you can do all sorts of other analog nonsense with your signals. Color complicates it a lot, but in black and white, you could basically just add the voltages of the signals together and you would be adding the pictures together. Make more sophisticated electronics, and you can have that adding modulated by a "key" signal, for example from a box that keys out the blue or green in an image and generates a black and white image saying where the weatherman is, and where his blue background is. You can use that to drop in a replacement background.
Scrolling credits for live television were basically done the same way. Somebody would lay out the credits, and hook a physical thing with the text to a crank. Somebody would shoot the credits with a camera, and somebody else would crank the credits so they scrolled past the camera. (My father apparently shot credits this way in the 70's.)
In some other cases, live composites might have been done simply by having a person stand near a projection screen showing whatever the background was, and getting it all in camera.
This Ars Technica page has some discussion of how overlays were composited with computer data for the Mission Control display screens. I think this sort of thing would have been pretty much state of the art. ("How primitive were those computers?" section) http://arstechnica.com/science/2014/07/apollo-11-turns-45-a-lunar-landing-anniversary-retrospective/2/
Hopefully this helps a bit.
I guess to add onto this question, how would something like William Shatner's live duet performance of Rocket Man have been done?