Go to file, Save for web. This is how you put them on the internet. When the box comes up, in the top right corner, do as the picture says:

Now go down to animation (which you checked up above) and depending on how fast you want it to go, change the frame delay.

Now you're done! This only works with GIF, so don't try to do it otherwise. If this was to confusing, comment please! Also if you want to put a regular photo on the internet don't do GIF, do PNG24!
It can't be very big so make it small! (the picture)