A newbie question and perhaps one I am not ready to ask but here goes...

I see websites that have small photos at top of page, and they change every few seconds. How is that done?