There's actually a lot to your question, since JavaScript can be run on the server now (see Node.js for example). Skip to the code below for the simple answer to your first question.
While there are ways to setup a process to build JavaScript files - giving you the ability to write typed JavaScript (see TypeScript for example), combine multiple JavaScript files into one (see webpack for example), etcetera - none of that is required when first starting out, and these days most sites will have a basic tutorial on how to get started using the library, which will get you going in the right direction.
So, consult your libraries docs for the exact specifics, but normally you'd want to download the library's main JavaScript files to the same directory as your site files (or a subdirectory within) and then include a reference to the library's file(s).
Note that a more advanced way to do this is via something like npm, and a lot of tutorials will recommend using this, but there's no reason you can't just download/save a JS file, or download and extract a zip file with it.
If the library only includes JavaScript files (such as with Phaser) you'll need to include this in each HTML file (or a layout file, if using a server-side language and they're supported).
For example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Example</title>
<!-- Other relevant code. -->
</head>
<body>
<!-- Content of your site. -->
<!-- Downloaded library file. -->
<script src="lib/phaser.min.js"></script>
<!-- Custom JavaScript. -->
<script src="app.js"></script>
</body>
</html>
Note that some libraries may want you to include the JavaScript at the top of the body, and/or you may also need to include CSS files in the head. Note also that the order matters; app.js can only use functionality defined in a file that has already been included/loaded.
Finally, you don't need to actually download and store third-party libraries on your own machine/server. As long as you have an internet connection (and your users do too) you can also use a CDN (content delivery network). There are various advantages (such as performance) and disadvantages (such as security and performance) of this, but again your library should have documentation on whether the library is available on a CDN, and how to reference it.
For example, in the example above you might swap out this line:
<script src="lib/phaser.min.js"></script>
with this line:
<script src="//cdn.jsdelivr.net/npm/phaser@3.24.1/dist/phaser.min.js"></script>