The phrase comes from the novel 'Don Quixote' where the main character attacks windmills, mistaking them for giants. In her speeches, she often tilts at windmills, like a modern-day Don Quixote.
Pro Tip 2/3
Metaphoric Use
Used metaphorically to speak about challenging nonexistent problems as if they were real or significant. He's tilting at windmills by insisting on changing a policy that doesn't exist.
Pro Tip 3/3
Futile Efforts
The phrase often implies that someone is wasting time and energy on a futile effort or conflict. Arguing with him on that subject is just tilting at windmills; he'll never change his mind.