How to switch window within the same program on a mac

This has been driving me nuts for some time now. I use “command+tab” all the time to switch between windows. But if I’m looking at two word documents at the same time, and I press “command+tab,” it switches me out of word all together. Turns out apple was one step ahead of me and already had the fix I needed…