For fleet and capital ship slots, you have to research them. Be careful of increasing fleet slots, since this will actually tax your economy.
For tactical and logistical upgrades, you click on the planet and go to the planetary upgrade menu. This is a bit expensive, so you're usually better off using military units for defense and colonizing new planets to get more space for logistic structures.