Idiom meaning, roughly, "conform to the accepted norm."
Supposedly the origin of this phrase is from the House of Commons, the lower house of the English Parliament. Back when it was still common for people to carry swords as a matter of course, more than one heated political debate on the floor of the House turned into a swordfight. The solution was to draw two lines somewhat further apart than two sword lengths. The debaters would "toe the line" when speaking, and would be unable to instantly reach each other with their swords. The lines are still painted on the floor to this day.
Thanks to Great Neb for correcting factual errors.