Foot Tapping and Head Nodding when playing

I don't understand how tapping or nodding your head (or feel it in your body) on the beat works when you are tried to play in time. When you tap your foot or nod your head are you subconsciously syncing your playing with the beat or do you have to think about your foot tapping/nodding like a metronome trying to match its time?

When I play I find that when I tap me foot it's not in sync with my playing sometimes, so is the foot tapping like telling you when the beats are and I try my best to play in time with those beats?