How to add a function to set a photo as "profileicon"?

.. from a photo of an album tidypics. how to make a link that usually send as when we choose the icon? I tried looking at the page to add the icon but do not know how...