Miner is one of Farsite Careers. If you want to boost your production, acquire a Sector on a Planet and establish your Base. Mine and refine Resources which are required for every in-game item production. Sell resources to Manufacturers or Traders on a local Station market.
Every item in game is made by players, and to make any item you need resources. Miners are backbone for whole economy to grow. As a miner you focus on faster mining and larger cargo options. Miner ship will be cheap so it wont be big waste if it gets destroyed. Mined resources are location based, so you must use/spend them where they are. If you need to transport resurces in other areas hire Hauler. Best way to transport huge amount of resources or valuable items is to hire a Hauler services.
As you progress, you will be able to mine faster. You will learn where are places to avoid or how to seek protection.
So when you go out as a miner, you are always aware of fact that someone can attack you. Still, you need to go out and mine resources. Its not impossible, you just need to take care. For example, when you go out in space, as beginner, you do not need to go far. Find closest asteroid fields and start mining. Keep an eye to new ships that enter that star. You will see them, and also you will see what ship type they are using. If you are careful, you will still have time to jump out of Star and return to safety.