The first command should be
sudo apt-get install tor which installs Tor ('standalone version' from the repository). The second command would have been used to install Vidalia. These commands install the software using
apt-get and it is therefore assumed you have a Debian based system e.g. Ubuntu, Debian etc. If not you can find a full list of packages along with instructions on how to install Tor on various Operating Systems on the Tor website https://www.torproject.org/download/download-unix.html.en
What is Vidalia used for?
The wikipedia page has some good information https://en.wikipedia.org/wiki/Vidalia_%28software%29 basically it is a discontinued Graphical User Interface for controlling Tor. It's no longer under development by the Tor Project (but Tails continue to develop a version for use in their OS). It's discontinuation is discussed here What happened to Vidalia?
Tor Project recommend that you don't use Vidalia so the document that you were reading is outdated.
The best place to find good instructions on how to set up hidden services, relays and anything Tor related is in the documentation found on the Tor website https://www.torproject.org/docs/documentation.html.en