From now on I'd like to use terms defined here. I have chosen terms used in solid modeling, which is used for computer aided design (including computer graphics and 3D geometry processing) for industrial products like automobiles. In fact what is required to solve this puzzle is very similar to what is required for automated product design using computers  the leadingedge field. So, when you learn to understand this puzzle it enables you to read essays of that field  of course I'm kidding.
This section describes every possibility to draw lines around a face that has a number.
These are all patterns for drawing lines around numbers.
There are only two cases with a vertex and loop: the loop goes or does not go through the vertex.

Usually, a vertex has neighboring vertices; each placed at its right, left, above, and below. 

Wrong case
Vertices never become the ends of loop. A loop cannot be formed if line ends at a vertex like this figure. 
Questions are always provided in square area (5x5 in "Rule details" section). This means there are exeptions with the outmost sides of the area:

You can draw lines only in two ways for the corner vertices.
Since no edge can exist outside of this square, mark "x" on those edges. 

Each of other vertices on the periphery has 3 neighboring vertices.
There is no edge to extend outside of this square area, so mark "x" there. 
So there are these cases for this kind of vertices. The last example shows a case when the loop doesn't crosses the vertex.
This explanation shows every basic technic and I can guarantee you that you will understand the rule fine.
If you can't wait to try on your own, go ahead. You can always come back to this section when you get stuck.