Help on this example

Hi to everyone,

I am doing a project and is similar to this website http://www.frameafriend.com/

Can anyone give me some idea how this work?

Thanks
tengngan