Since you did not say where you are located, I assume you are asking about the standard 4 wire analog phone system in the USA.
The first answer given in reply to your question is correct. However, from your question I am not sure if you are familiar with how analog telephones work, so I will add a bit of explanation to the answer:
If you look at the jack into which you plug the phone's cord to connect the phone to the network, you will see four thin wires held in place by grooves in the plastic of the jack's body. When you plug the phone cord into the jack, its four contacts will touch those four wires, connecting the phone to the network. However, a phone typically uses only two of those wires, with the other two reserved for a second phone line should you wish to have one installed.
The two wires in the center of the jack are the ones which are connected to the first phone line. They are referred to as "Tip" and "Ring", names which came from the very first hardware used to implement the phone system, and are not important to know for your purpose. Although each line is supposed to be connected properly to its corresponding line in the phone, the two lines in the jack are often wired in reverse, that is, the "Tip" and "Ring" connections of the phone line which connects to the phone system are connected to the opposite pins in the jack. Thus, the "Tip" line is often connected to the "Ring" wire in the jack, and the "Ring" line is connected to the "Tip" wire in the jack. This is of little consequence in modern phone systems, as new phones are made to deal with this problem with no problems.
The four wires which connect to the jack represent "Tip" and "Ring" for two phone lines. If the jack is wired correctly, the Red and Green wires are connected to "Line 1" at the phone exchange, and the Black and Yellow wires are connected to Tip and Ring of "Line 2" at the phone exchange. A regular one-line phone handset will only use Line 1's wires, while a two-line phone handset will have provision to also connect to Line 2 by pressing a button on the phone to connect to Line 1 or Line 2.
The telephone handset, in effect, has the "speaker" and the "microphone" connected in series, then connected to Tip and Ring for Line 1 (in a single line phone) and Line 2 (in a two line phone). Thus, if you wished to connect a phone or an equivalent device to the phone line, you would connect to the two "inner" wires in the phone jack, to which the Green and Red wires connect from the external phone line leading to the phone company. In early phones, the "speaker" was a permanent magnet speaker small enough to fit in the handset, while the "microphone" was a carbon-granule unit whose resistance was varied by the vibrations from the speaker's voice. Since it is in series with the speaker in the handset, both the speaker in the sender's phone would reproduce the voice, as well as the speakerr in the distant phone. To accomplish this, a small dc current is placed on the line, in series with the microphones and speakers of the two phones which are connected together by the phone company in response to dialed numbers at the sender's phone.
Modern phones don't use carbon microphones, though they may use similar speakers to the original phones. Instead, modren phones usually have an integrated circuit which "mimics" the actions of an original analog phone, by varying the current in the line in response to vibration of a small microphone's diaphragm which is vibrated by the voice of the person speaking into the microphone. This allows a modern phone to be used at one end of the line, while an older design, with the carbon microphone, for example, may be used at the other end of the line, with satisfactory results.
If you wish to connect a phone to the phone line, you simply connect as described above. That is, connect the two wires from the phone to the Tip and Ring positions of the wall jack. However, if you wish to connect something else, such as a modem, you would instead connect the terminals of an analog modem to the Tip and Ring wires of the phone jack which is usually mounted in the wall.
I hope this helps. It is difficult to explain with simplicity. If my explanation is confusing, I am sure you can find a diagram of the hookup by searching the internet, or by looking a library. The analog phone system has been around for over one hundred years, and there is a lot of information about it made available in most public libraries and technical books.
Good Answers: