Credits are the in-game currency of Ascii Sector, needed to buy ships, upgrades and equipment. You also need to pay for ship repairs, for Autodoc treatments and hotel stays. Luckily the fuel for your ship is free.
The main methods of making money in this game are trading, missions from the Merchants and Mercenaries guild, and fixer missions from bars. Head hunting missions and particularly hauling illegal contraband can become quite profitable later.
It is also theoretically possible to fill your cargo bay by shooting up asteroids, however this is far too tedious to be viable. You can hunt pirates, however their ships never carry cargo, so your only income would be selling the armor and weapons you pry from their dead hands and what little cash they have on them.
Finally you could turn pirate yourself, board merchants and rob them blind, but unless you have a very strong ship the Confed will put a stop to that pretty quickly. Also you may receive fines for your criminal actions.