This depends on what period you mean. If you're looking for a Classical answer with the Greeks and Romans and all, this thread has answers from u/Iphikrates and u/Iguana_on_a_stick.
If you mean 1700s-onward Rev War/Napoleonic Wars musket battles, you'll want this section of the FAQ, the three subsections with 'Linear Tactics' in the name.