It matters which program you are trying to install because there is no one way to configure, build and install a package. There are lots of build systems out there, and it depends what the developers who wrote the program decided to use.
Common build systems include, but are not limited to:
- a list of instructions to manually compile, link and then install
- hand-made makefiles
- automake/autoconf generated makefiles (very common)
- cmake generated makefiles (not so common, but a nice build system)
- scons projects
This list is nearly endless, these are just of a few of the options. This doesn't even start to go into project written in perl or python which have their own build systems.
Basically, the answer is "it depends on the thing you are trying to build/install", so if you don't want to say what it is, we will find it very difficult to help you.
Having said all that, do you even need to build it? Can you not find a pre-built package in your distribution's repositories?