NPM scripts allow developers to run predefined scripts at different stages of installing, publishing, and interacting with packages. These scripts are defined in the package.json file under the "scripts" key. Common script names include preinstall, install, postinstall, prepublish, publish, and postpublish. NPM versioning follows semantic versioning principles where versions are denoted as MAJOR.MINOR.PATCH. Dependencies can specify version ranges like tilde (~), caret (^), and hyphen (-) to control updates. Private NPM repositories and shrinkwrapping help ensure reproducible builds across environments. Scoped packages allow publishing packages under a unique namespace.