NET USE and SUBST are two commands for mapping a drive letter to a network or local path.

For example, to map a network share:

net use Z: \\\share
subst Y: \\\share

or to map a local path:

subst X: C:\Windows
subst W: D:\

and then delete them:

net use /d Z:
subst /d Y:

However, effects of both of these commands are only visible to the user who carried out these commands, i.e. a drive letter mapped by user A is not visible to user B, and user B can still use that letter to map to another path. Unless the drive letter is created by SYSTEM account, which is visible to all users.

For drive letters created by NET USE, they are recorded under registry key HKEY_USERS\<UserSID>\Network.