Are you knitting flat or in the round? Are you finishing a row before you set your work down?
Setting it down in the middle of a row is sometimes the cause because you continue what stitch you were doing, but if you're going the wrong way it would be incorrect. Try to tell us a little more what you're doing.
When asking questions ALWAYS post the name and a link for the pattern if you have it.
If you're doing stockinette st - knit a row, purl a row - you've done 2 purl rows or 2 knit rows together instead of alternating. When you start a row, look at the sts on the needle - if they look like V knits, knit them, if they look like purl bumps, purl them. Or you could put a safety pin on the knit row so you know that's always the knit side.