Philip II spent much of his youth as a hostage at Thebes, where he studied under the renowned general Epaminondas, whose reforms were the basis for the phalanx. Phalangites were professional soldiers, and were among the first troops ever to be drilled, thereby allowing them to execute complex maneuvers well beyond the reach of most other armies. They fought packed in a close rectangular formation, typically eight men deep, with a leader at the head of each column and a secondary leader in the middle, so that the back rows could move off to the sides if more frontage was needed. Unlike earlier hoplites, phalangites were unarmored except possibly those of the first row, and carried only tiny shields. No enemies were expected to get close enough for them to need any.
Each phalangite carried as his primary weapon a sarissa, a double-pointed pike over four metres in length. These were carried in two pieces, slid together just before battle, and had to be wielded with two hands. At close range such large weapons were useless, but an intact phalanx could easily keep its enemies at a distance; the weapons of the first five rows of men all projected beyond the front of the formation, so that there were more spearpoints than available targets at any given time. The secondary weapon, more or less an afterthought, was a small dagger.
Neither Philip nor Alexander actually used the phalanx as their arm of choice, but instead used it to hold the enemy in place while their light cavalry broke through their ranks. The Macedonian cavalry fought in wedge formation and was stationed on the far right; after these broke through the enemy lines they were followed by the hyspapists, elite infantrymen who served as the king's bodyguard, and then the phalanx proper. The left flank was generally covered by allied cavalry supplied by the Thessalians, which fought in rhomboid formation and served mainly in a defensive role.
Other forces - skirmishers, range troops, reserves of allied hoplites, and artillery - were also employed. The phalanx carried with it a fairly minimal baggage train, with only one servant for every few men. This gave it a marching speed that contemporary armies could not hope to match - on occasion forces surrendered to Alexander simply because they were not expecting him to show up for several more days. Phalangites were drilled to perform short forced marches if required.
The armies of the early hellenistic period were equipped and fought mainly in the same style as Alexander's. Towards the end, however, there was a general slide away from the combined arms approach back to using the phalanx itself as the arm of decision, having it charge into the enemy lines much like earlier hoplites had. This left the formation fairly vulnerable - though near invincible to forwards assault, phalanxes like other infantry formations were fairly prone to flanking, and worse still tending to break up when advancing quickly over rough ground. So long as everyone was using the same tactics these weaknesses were not immediately apparent, but with the advent of the Roman legion they proved fatal in every major engagement (the most famous being the Battle of Pydna), as the Romans were able to advance through gaps in the line and easily defeat the phalangites once in close.