Entrenchment is most effective when defending cities or heavily contested resources, especially when the defending army is placed at a choke point. Be wary of flamethrowers as they can instantly destroy a unit's entrenchment.
From the Classical Age to the Enlightenment Age, entrenchments resemble a row of sharpened sticks. From the Industrial Age onward, they resemble sandbags. This is only an aesthetic change and does not affect the defensive ability of the entrenchments.
American unique Marines line of units will automatically entrench if they do not move nor attack for 5 seconds. This ability does not require a nearby general, and can be done in neutral and enemy territory, making them useful for protecting sieges and defending cities under assimilation.