When you install the server-side socket.io library and then initialize socket.io server-side, you pass it your express app object. It then installs a route handler for the/socket.io/socket.io.js route and when that route is requested, that handler serves up the appropriate client file from it's own socket.io module. The client file is not at this exact path and does not necessarily even have this filename, but when that route is hit, the server-side socket.io installed route will serve up the appropriate file for client-side socket.io support.
There is a nice advantage to doing it this way because any time you upgrade your server-side socket.io library, you will automatically get a new client-side library (embedded in the server-side library) that will always keep the two in sync. If you served a separate client-side library (from a CDN or from your own route), you'd have to make sure you upgraded client and server libraries at the same time.
If you want to serve up jQuery from your server, then you can either use express.static() to put the jQuery file in a known location on your server and use the express.static() configuration to point a specific route to the right location. See Serving Static Files in Express for documentation.
Or, if you really want to do it like socket.io does it, then you can install your own route for /jquery/jquery.js and then you serve up the jQuery file (from wherever you put it on your server) whenever that route is hit. For example, here's a custom route to serve up a specific version of jQuery from where it gets installed with the command you mentioned npm install --save jquery:
app.get('/jquery/jquery.js', function(req, res) {
res.sendfile(__dirname + '/node_modules/jquery/dist/jquery.min.js');
});