There are four ways to make money:
      1. Trading (carrying) goods between space stations.
      2. Building and operating factories (i.e., space stations).
      3. Killing pirates and selling their cargos.
      4. Killing Xenons (if you have a bounty-hunter's license).
Only the first two amount to anything.  Killing Xenons is fun (and necessary), but you won't make any money at it.)
Everything starts with trading.  You trade very simply:
      a. Land (dock) at a space station.
      b. Buy goods and load them into your cargo bay.
      c. Fly to another station and sell them the goods.
There are lots of stations, and what they're willing to buy varies a lot.  Most of them only sell one item.  More on trading later.