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
In my experience GD is not very memory-effective for large images, so I strongly encourage you to use Imagick. I`ve written a code snippet for thumbnail generation with php using the Imagick library. You can modify it to save the image instead of echoing it using http://php.net/manual/en/imagick.writeimage.php
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.