Healing and Repairs usually only offer via special events or at a specific location. Unless the player is grievously injured or their ship is disabled most places that offer healing/repairs will be able to fully heal/repair. The cost can vary either by location or can be a standard cost. Also, given the level of difficulty the layer want, the cost can also vary based on how much damage was inflicted upon the player.
There are special event which offers to heal/repair player outside of civilization however it is best if players amps course that enables quick access to civilization if needed.