When is the Best Time to Take Your Timeouts During a Game?

I'm so confused about when/why you want to take timeouts at certain points in the game? Any thoughts on this?