I have always had a hard time trying to figure out how to configure sources.list in Debian or its derivatives, like Ubuntu. To learn this thing myself, and to give a basic introduction to all, this post is being written.
Read it here
Debian uses dpkg, apt-get, aptitude, and other programs to install and maintain software packages. These applications, in turn, use the /etc/apt/sources.list file to figure out which repositories to use and where they are located. Depending on how you configure sources.list, the selection of software available to you will vary. So it is important to learn more about this critical piece of your Debian experience.