On Linux, if you're happy with the version of SDL that can be installed via the package manager, then that is the simplest route. If not, you can download or checkout the appropriate version and build / install it manually. Once installed, you'll need to configure your building toolchain to include the appropriate arguments. As a simple example, from the command line something like the following:
$ g++ main.cpp -o sdl-test `sdl-config --cflags --libs`
You can manually invoke the sdl-config to see what arguments it is passing to the compiler / linker. Generally, you don't actually build directly on the command line but instead using some kind of Make like tool and/or an IDE. You'll need to figure out how to ensure the relevant command line arguments are passed to the compiler / linker on a per-tool basis.
On Windows, if you use Visual Studio typically one downloads a precompiled version of the library. You may need to configure your project with the correct additional include / library directories, and the static libraries you want to link to. You'll also want to copy the SDL DLL into your project directory. If you are using the same toolchain as on Linux, then the process tends to be quite similar - just without the package manager.
Basic SDL should be standalone, you won't need other dependencies. If you want to use any of the add-on libraries, such as SDL_TTF, SDL_Image or SDL_Net, you may need to install their dependencies. This is a similar process, but simpler as you may not need the headers and static libraries, just the DLLs / shared objects.
Please read the SDL FAQ
for more information on specific toolchains.
That would probably work, but it may introduce unwanted licensing issues - though SDL has a liberal license IIRC.