I believe you are referring to Administrative Shares (C$, D$, Admin$ etc)
By default, anyone who wish to connect to another PC administrative shares
will be challenge for administrative privilege, so normal user who don't know
the admin credential will not be able to connect in.
If you what to disable these shares, you need to modify the registry.
For Server:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters\AutoShareServer = 0 (REG_DWORD)
For Workstation:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters\AutoShareWks = 0 (REG_DWORD)
Remember to reboot the machine after modifying.
HTH.