I was just wondering how I can make thumbnails of images stored in hdd and use them in an html page, also I need the thumbnails to be able to enlarge (to their original size
The gd library allows you to manipulate images.
You will find an article to generate thumbnails here.
If you want to allow your users to view the thumbnail and the original size, the best way is to keep the two versions.
And to display either one or the other.