Carriers carried several different types of planes. Fighters, dive bombers, and torpedeo planes, and spotting planes to locate the enemy.
Carriers had no main guns, so their planes were their weapons. They kept away from the enemy, also moving forward, back and to the side so the enemy could not keep a fix on their location.
Some fighters stayed over head as CAP (Combat Air Patrol) to keep enemy fighters off. Some fighters escorted attack planes to the enemy to protect them. Carrier battles were fought at under 200 miles distance because of the limited range of the planes.
Optimally, the attack planes all arrived at the same time, the fighters pulled the enemy fighters off station, the dive bombers came in high, the torpedo planes in low. Usually they arrived in waves instead.