Forts are super-strong defensive structures meant to hold and reinforce territory, and are also used to train a variety of units. Officers, spies, and all gunpowder infantry and siege units are trained from your forts. Forts are available once Level 4 Military (Recruitment) is researched, and with further fortification upgrades, you can upgrade your forts to be more tactically efficient, incrasing your strategic strength and options.
For this reason, Forts are a viable weapon to be used for border rush strategies, with factions capable of raising Wealth, Metal, or having perks in Fort construction capable of using them to seize ground and deny it to enemies. Done right, you can use this to hem in your opponent and prevent them from spreading further — the Macedonian faction is very well-suited to this play style, but others such as the Britons and Getae can also do it too — being able to raise Wealth through better taxation, or extract more ore to create Metal means more Forts. Getae forts are known especially for their better range, thus making them more tactically effective, although the lower cost of Macedonian forts makes them more strategically useful.
Note, however, that despite being strong, Forts are vulnerable to siege weapons. The trebuchet, having the furthest reach in the entire game, can easily wreck anything with impunity regardless.