packages are namespaced in a directory for each package/version, like this:
/nix/store/b6gvzjyb2pg0kjfwrjmg1vfhh54ad73z-firefox-33.1/
if a package is "installed" in an environment (it could be global, user local or temporary), its files are sym-linked in the "original" position (e.g. /usr/bin/firefox etc etc)