The excerpt is from Chapter 36, "The Quarter Deck." Here, Ahab is ordering Mr. Starbuck to send the entire crew "aft," that is, to the quarter deck, the rearmost deck of the ship, generally reserved for the Captain. When Ahab calls out to the "mast-heads," he of course is calling out to the men standing lookout for whales at the top of the masts. This figure of speech is a metonym. A metonym is when something is referred to not by its real name but by something associated with it; a common example would be the use of the word "Pentagon" to refer to the U.S. military, or "Wall Street" to refer to the financial industry. Here, the men at the top of the masts are simply called "mast-heads."