You need to have a client (the computer which is initiating the transfer) and a server (the computer you are transferring the file to).
(You can also do it the other way around, where the client initiates the transfer by asking the server for the file, and then gets the file in the response, but that isn't what you are asking).
A typical way to do this using Node.js would be to have the server understand HTTP and for the client to make an HTTP request.
This question explains how to make an HTTP post request with an attached file which covers the needs of the client.
This question explains how to use Express.js to receive the file. You can then save it as normal in Node.js.