There's a few ways to install software in linux. One is to compile your own programs and other is use the package manager.
To compile program from source you need obviously the program source code and then use the following commands in the extracted sources:
To install Samba you can check the samba website
Read the How to install document and you should be fine.
For installing software, if your using Red Hat then you use rpm packages and should see the following:
rpm -Uvh packages...
Install/upgrade packages, and let me know what happens
rpm -Uvh --force packages...
Install packages despite any warnings about dependencies or conflicts. Unless you know what you are doing, this tends to do bad things to your install. The warnings are there for a reason!
rpm -qi packagename
Tell me all about packagename, which is already installed.
rpm -qpi packagename-1.0mdk.i586.rpm
Tell me all about the package contained in packagename-1.0mdk.i586.rpm, which doesn't have to be installed.
rpm -q --changelog packagename
Display the changelog for the installed package packagename.
List ALL packages installed on my system. Tends to produce a lot of output (which you can grep for what you want)