Barracks are where you raise soldiers.
You may hire 100 soldiers for each General you have. You unlock a new General slot with each Barbarian Outpost you defeat.
Choosing longer time periods results in only a modest rise in cost and reduction in number of solders produced per hour. Attempting to mini-max here isn't worth the effort. Choose whichever time span works for your schedule.
The Barracks are unlocked at level 6.
The Barracks were introduced in the July 22nd 2010 update.
There is a mini-tutorial of what to do next included once you unlock Volcano Island