If the edge, which you want to turn into its position in the upper layer, is in the lower layer, then the situation can be transfered to any one of the situations shown in the first two pictures by turning the lower layer. If one has a situation shown in Fig. Try to figure out for yourselves, how this works. Later on, you can save some moves by judicious thinking. Continue doing this, until all edges are in their correct positions.
Next step is to place corners of the upper layer in correct position.
The situation that can occur is depicted in the following picture. This step may best be explained by looking at pictures, which probably show most cases that can occur. After some time you will surely find more efficient versions of the algorithms for each special case that will arise. By now you should have completed the upper layer of the cube. If not, keep trying and thinking, the final result will surely materialize.