Node.js is a javascript engine that runs on your computer without a browser window. It is widely used for developing backend systems for web sites and development tools.
The easiest is to uses the official installer that can be found on their website.
There is also a Homebrew package called 'node'.
After the installation you have access to the node
binary from the terminal to runs scripts:
node script.js
There is also an interactive interpreter that can be used to test small code snippets:
node
Additional modules can be installed using npm
(node package manager):
npm install csv
You can find many packages on the official website of the package manager.