Summary:
Military units can engage in combat against other units or against cities. Most military units are "melee units," meaning that they can attack only enemies in hexes directly adjacent to them. Some military units are "ranged units," meaning that they can attack enemies one or more hexes away.
See the section on Combat for details.