What to do When the Market Acts Irrational

What should you do when the market stops making sense or you want to hedge out risk?