Most people are familiar with a standard phone jack, at least what they look like. Most are either wall-mounted or protrude from a baseboard. The technology of phone jacks has changed little in a century. What has changed is the way in which some jacks are actually wired. Although the telephone line inside your house usually consists of one line containing four colour-coded wires, some jacks nowadays actually contain the four red, green, yellow and black wires. The telephone line only provides power. So before rewiring, check the source your of phone problem.
Check the jack with a known working phone before doing any rewiring.
Find the telephone interface or junction box, usually located on the outside of your house (in many apartments a version of this box can be located within the apartments). Open the access panel and disconnect your telephone line before doing any rewiring. Although phones are very low voltage, you could still get a jolt if the phone happened to ring while you were working on it.
Disconnect your phone from the jack.
Remove the jack from the wall. Most are connected with a single screw; others are attached with plastic snaps. In that case, just gently pull the jack from the baseboard. Be careful not to damage the incoming wire.
Examine the wiring. Determine if it is a single line containing four wires---green and red (the primary line) and yellow and black (the secondary line, which may or may not be connected). If it's not a single line, it's probably two lines (usually blue) connected to two terminals in the jack---the same terminals to which the green and red lines are connected. In this case, the jack itself contains the four colour-coded lines.
Disconnect the lines that are connected, either the green and red primary lines or all four. If you have a jack that provides the four colour-coded lines, you'll also have to disconnect the two separate blue lines coming from the junction box. Most jacks contain simple screws around which the wires are either wound or connected to by clips. Just loosen the screws slightly to release the wires.
Check the wires or clips for wear or damage. Perhaps they weren't even secured snugly or properly. With a typical one-line, four-wire connection, cut the damaged or frayed ends away with wire cutters and strip the wires to expose new ends. If you have the self-contained type jack, check the clips from the blue wires and the four colour-coded wires. If there is damage to the self-contained green, red, yellow or black clips, it probably is not worth your while to try to splice on new clips. A new jack costs only a couple dollars.
Reattach the lines to the same posts to which they previously were connected. Before attaching the jack to the wall, connect the outside lines at the junction box and plug in your phone to ensure you have a dial tone. Reattach the jack to the baseboard.
If, after rewiring, you still have no dial tone, try replacing the jack with another one in the house to make sure the problem is yours and not the phone company's. If the other jack provides a dial tone, buy a new jack to replace the one you rewired.