What factors bring sand into or out of the beach? I like to walk my dog along a beach, but in medium to high tide, there is no beach at all, as the water reaches the bluffs.



The thing is, the height of the sand seems to vary drastically as well. Sometimes, I'll be fine walking at medium-high tide because so much sand has deposited that there's still a path. (I first noticed this when I couldn't find the usual caves and crevices along my walk—I realized they were buried in six feet of sand.) Other times, even at low tide some of the waves reach my ankles, even the cliffs. In those times, I also end up walking on rock instead of sand at parts, and can see this rockbed extend out toward the break.

What brings the sand in or out?

I know the obvious answer is the incoming or outgoing tide, but I've walked at low tide when the sand was very, very high (therefore, didn't flush out with the tide), such that the beach seemed gigantic. I've also gone surfing in high tide when I couldn't stand on my feet near the bluffs, because the sand never came in. And I don't think it can be rip currents since the sand height is more or less uniform throughout the beach.
The amount of sand on the beach at any one time is a dynamic quasi-equilibrium between a whole raft of processes. These include wave power, frequency and direction, seabed angle, longshore drift, rips and undertow, wind strength, direction and continuity, fetch, coastal geomorphology, sediment availability, offshore currents, and probably other variables. 

The entire system is too complex to summarize here, so I recommend Robin Davidson-Arnott's excellent book: 'An introduction to coastal processes and geomorphology'. Cambridge University Press, 2010.