All pokemon have some form of speed. When two pokemon attack, the one with the higher speed will go first, assuming nobody uses a priority move like quick attack.   Example:
Typhlosion- speed 250,      Aggron-speed 100
Typhlosion will move first since his speed is higher; it gives you the chance to make the first move on the opponent.