An elephant trainer, rider, or keeper is called a mahout. Mahouts were responsible for capturing and handling elephants. To accomplish this, they utilize metal chains and a specialized hook called an aṅkuśa or 'elephant goad'. According to Chanakya as recorded in the Arthashastra, first the mahout would have to get the elephant used to being led. The elephant would have learn how to raise its legs to help a rider climb on. Then the elephants were taught to run and maneuver around obstacles, and move in formation. These elephants would be fit to learn how to systematically trample and charge enemies.
This site contains all information about War Elephant Alexander.