Tasneem, if your pattern tells you to knit the knits and purl the purls it means: As the work faces you as you are preparing to begin the next row, as the stitches appear on the left hand needle is the way you want to work them. If the stitch looks like a knit, knit it. If it looks like a purl, purl it. Don't worry about any other row and opposites or any confusing thing, just knit the ones that look like knits and purl the ones that look like purls. Go back to post #6 in this long thread to see a good picture showing what a knit looks like and a purl.
If you are working Stockinette St back and forth so that it is worked flat, you knit a row and purl a row. You do this same thing when you do this stitch. As a side is facing you to begin a row if the knits face you you knit them, if the purls face you you purl them. This continues to put all the smooth knits on one side and all the purl bumps (as I call them) on one side.
When you are working more complex stitches you often have a mixture of knits and purls on the same row. Often, but not always, on the public side of the fabric they tell you a certain set up of stitches and on the return row (non-public side) they tell you to knit the knits and purl the purls, or to work the stitches as they appear (both mean the same thing).
When you are working most kinds of ribbing once you have the pattern of knits and purls set up you always knit the knits and purl the purls no matter which side you are working on.