How do they make those image galleries?

I pretty much want to make a gallery like this: click here or this: [URL=]click here too. This is what I want.

So my questions to pros or to the wise and most experienced: what language are they using? PHP? XML? Is the page itself dynamic such that one html file handles all the images for a certain album?

I would look on GOOGLE however I really wouldn’t know where to look as the page itself doesn’t leave any clues. Thanks for the help peoples.