The Yarn Over increase (YO inc) is used with laces and the direction in which the yarn is wrapped depends on the preceding stitch (K or P) and the subsequent stitch (K or P). For the YO inc after a K stitch and before a P stitch, the yarn is wound front to back and then brought forward again under the right hand needle to be in the proper position for the subsequent purl stitch. This is one of two YO increases used in the Mock Croc Socks. For additional instructions and another photo read more...
It is not as difficult to remember all the combinations as it may at first appear; if you yarn over for the increase in the wrong direction, the yarn slips off as soon as you pick up yarn for the next stitch because you "unwind" the yarn. So, picture the direction the yarn will be drawn for the stitch following the increase and where the yarn needs to be for the subsequent stitch (front or back) to wrap the yarn correctly. This way you won't have to remember combinations.