Shell closures, loosely bound structures, and halos in exotic nuclei