Any time you run out of cards in your draw pile, you shuffle your discard pile into a new draw pile. You also do so when effects from things like Action Cards reference your draw pile and require more cards than are currently in it. If your discard pile is empty and you cannot replenish your draw pile, you continue to game as is.
Example: The Stargazing Witch card’s ability let you look at the top three cards on your draw pile, but you only have two cards left in your draw pile right now. You shuffle your discard pile, put it beneath your current draw pile of two cards, and view the third card.