Hi there! There are several ways to keep track of your knitting. Lots of people use stitch markers, which you can buy (anything from simple plastic clips to ornate jeweled versions), or make (some people just use a small piece of different-colored yarn, or you can cut soda straws into little round pieces, for example). So, say, if there is a pattern repeat every 10 to 20 stitches, you can place a marker to help remind you. You can count to yourself or make tally marks on paper.
In time, you will also be able to "read" the knitting, differentiating how a purl stitch looks different than a knit stitch, same thing with yarn overs and SSKs. Then you can visually tell where you are.
You are right that it helps to focus on your work rather than watching TV or talking with someone while you knit.
I can't say if it becomes second nature, because I have only been knitting for a year myself, and can still wind up losing track. In that case I "tink" back until I figure out where I am. HTH! I'm sure you will figure out a good way of doing it!