Hiding Folder contents

Hi guys,

Ok this is pretty random, so let me just put it here. On my website, I want to hide the contents of the “images” folder, - the way I used to do it is to put an index.html page there and keep it blank, this way no one will be able to tell the contents of that folder. But I realized some websites are able to give you the “unexisting” page, when trying to access the folder, but when going to an internal file, it gives you the content.

Any idea how this works? Thanks !