You buy everything seperately. For example, let's say an Infantry Platoon consists of 1 command section and 2 infantry squads. You'd take the points costs listed for a command section (should be under the Command HQ entry in the codex) and add it to the cost of each Infantry Squad (once again, clearly listed in the codex), making sure you take into account upgrades for each squad. The sum is the total cost for your platoon.