When Does Following A Car Become Tailgating?

Nobody wants to have a tailgater right behind them, and laws often forbid the practice. But how do you know when you've crossed over into tailgating?