Military is a horrific beast. Debatably, in order of difficulty, are stockpiles, stairs, and military. One of my friends gave up DF due to stairs.
Military basically works in three parts. Squads, Equipment, and Schedules.
I assume you've made a squad already. This part is very easy. You grab a militia commander/captain, then assign dwarves from a list. Dwarf Therapist helps here, if you don't already have it. Assign nicknames to your soldiers, like I name mine "Axe" and "Spear". So when I make another squad, I don't get the same dwarves and mess everything up.
Equipment is also rather easy. You can manually assign equipment via the equipment screen, or you can make a uniform and then assign that uniform to multiple units. Once a uniform is assigned, it can be modified for the individuals, for example if you wanted to add a red hood for your commander but leave your other soldiers hood-less. Modifying an existing uniform does NOT change that uniform for anyone using it, you have to re-assign them the uniform for the changes to take effect.
Schedules is the tough part. They exist in two parts. Schedules and Alerts. These are passive orders, standing orders like "train some" or "patrol this dirt". First, set up a schedule. The default is "nothing" and "everyone train". These are both fairly lame. First tone the training down to 5 or so via the schedule editing screen, you can copy-paste for every month for quick changes. The schedule determines what your squad is doing every month, and you can determine how many people are doing what. In general, I'll set 5 to station at the front gate, 2 to train (which promotes sparring sessions, the holy grail of training), and the other 3 to sleep/eat/sort socks/whatever. Then, you need to activate that schedule. Alerts are basically different schedules. If you notice your dwarves are training a lot but they're so high-skill they're not improving much, then you can change their alert to something less intensive, and put them more on patrol and less on guard. Or if there's been a major battle, you may need to put your squad inactive so they can take a break to avoid tantruming. You usually won't change your alert status, but you can give direct orders to military that override the alerts entirely, so you can order your soldiers to stand guard even if they're scheduled to train. A good idea is to have a heavy guard in the late fall months, stationed or patrolling near the trade depot, as goblins like to ambush when caravans arrive. You can set them to patrol near your gate during fall, and to train the rest of the year, by setting their monthly activity in the schedule.
The important thing to note, is that civilians have an alert status as well. All civilians share this alert, and the only effect it has is to restrict them to a burrow. This is very good. I play with Fortress Defense, modded to remove all ambushers and babysnatchers. The only enemies to come to my fort are sieges, which are revealed on the map's edge and stay there for a little while before rushing in. Thus, for me, I have a burrow defined (from the "w" menu) that includes the entire inner fort. In the alert menu (m - a) you can go to the desired alert, for me I use the Active/Training alert, and then on the right-hand column press enter on the burrow you want. This means, when this alert is selected, all civilians will be restricted to the area defined by this burrow. Any dwarf under military command, either direct order or standing schedule, will ignore this burrow, but as soon as they go off duty they will respect the burrow.
So, for me, I get a message "A vile force of darkness approaches!" It pauses for me, and while paused I hit m - a to go to alerts, then activate Active/Training for civilians, where it shows the [CIV] beside it. I then zoom to my front gate, and s - A - B - m to order my first and second squads to move outside the front gate. When the enemy arrives, I lock the front door, so that just in case my soldiers loose, or they chase after someone and another enemy squad slips in while they're running around, my civilians are safe.
Overall, the most challenging part is alerts and schedules. You just have to realize that a schedule is just that, a list of passive orders, and an alert is a way to select which schedule is being used.