I am wondering how do youtube create those embed script and when the embed script is placed on other site to display the video, how do the do this in the backend? Do they just push the video on to the defined space, like Adsense?

<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/4CpmCbBquUI&rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/4CpmCbBquUI&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>