After solving one side of the cube (with the 4 connected sides correct color) rotate the opposite face until you get an edge piece matching a center piece, but without the opposite face's color. For example, if the unsolved face is yellow and you see an orange edge piece on the same side of the cube, rotate the unsolved face until the other side of the edge piece finds its color. After all that, with the edge piece matching the middle and the opposite-of-the-solved-face side up, do the following algorithms.
If the edge piece needs to go clockwise:
Top-face clockwise,
Right-face clockwise,
Top-face counter-clockwise,
Right-face counter-clockwise,
Top-face counter-clockwise,
Front-face counter-clockwise,
Top-face clockwise,
and Front-face clockwise.
If the edge piece needs to go counter-clockwise:
Top-face counter-clockwise,
Left-face counter-clockwise,
Top-face clockwise,
Left-face clockwise,
Top-face clockwise,
Front-face clockwise,
Top-face counter-clockwise,
and Front-face counter-clockwise.
If you need further help read this:
http://www.rubiks.com/solving-center/pdf/Rubiks_cube_3x3_solution-en.pdf