Attack is an attribute that shows how powerful a unit is. When a unit attacks another unit, the units will fight each other, doing damage to each other. If one unit has a higher attack, that unit will do more damage. Attack is represented by a sword.
Every unit and building made to harm something else will have attack, some units are stronger then others. A citizen (who shouldn't be fighting anyway) has a very low attack stat, compared to the basic infantry unit with a good attack stat, to a nuke that has a huge attack stat that will wipe out almost everything hit.
Note: Having a high attack doesn't mean your unit can kill everything quickly, an infantry unit with a high attack will quickly kill (most) units on the ground, compared if it was attacking a wall, which has a resistance to normal attack (this is where siege comes in).
Attack serves to tell the player how powerful a unit is in terms of offense. There are different modes of attack for every unit, there are melee units that need to be up close to inflict damage (especially in the early ages) to ranged units (such as archers and marines) that attack from a distance, to bombers that fly over your enemy's army and drop high explosives to heavily damage/kill units. The amount of damage done by an attack is also effected by the armor of the unit being attacked.