As probably you already know Stockfish is "only" a chess engine. It means it's "only" the part of the program that makes the thinking, and it has no interface at all.
I haven't used Ubuntu for a while, but AFAIK Stockfish is available on its repositories, so you should be able to install it just by:
$ sudo apt-get install stockfish
If for whatever reason you need/want to install Stockfish from the sources, once you've downloaded the code from the github repo, you just need a C++ compiler (v.g. g++) and from the "src" folder enter the command:
$ make build ARCH=x86-64 (This is for 64-bit systems)
$ make build ARCH=x86-32 (This is for 32-bit systems)
In order to be able to play against Stockfis you need a chess GUI, for example Arena (only windows version, so you need wine in order to make it work) and ScidVsPC are vey popular:
http://scidvspc.sourceforge.net/
http://www.playwitharena.com/
Once you've installed a GUI and the Stockfish engine, you just have to add the Stockfish engine to the GUI in order to be able to play against it.
chs
is a convenient CLI UI for Stockfish: github.com/nickzuber/chs for it. Related for CLI UIs: chess.stackexchange.com/questions/1600/… GNOME Chess is a more user friendly GUI UI: github.com/flathub/org.gnome.Chess/issues/13