A squadron was any group of coordinated aerial or space warships. They could be made up of Starfighters, Bombers, Gunships, and Capital ships. Squadrons could be permanent or temporary and were used for a variety of missions. The most common make up for starfighter squadrons was 12 ships.
Starfighters were used in a huge variety of missions. The most common were attack missions, seek and destroy, escorts and reconnaissance.
Bombers were used to assault ground targets or larger warships.
Gunships were used to seek and destroy starfighters and bombers and/or to protect capital ships.
Capital ships were sometimes called groups instead of squadrons; however, they were essentially used in the same way as their smaller counterparts, only on a larger scale.
Typically Squadrons operated under a squadron commander, with an Executive Officer, and Second in command. Their personal ranks varied depending on the type of squadron. For Example; a starfighter squadron may have a Commander or Captain, while a squadron of Capital Ships would be under a full Admiral, Commodore, or General.