When reading codes from your vehicle the fault code reader may show them as pending codes or normal Diagnostic Trouble Codes (DTC).
Pending codes (also known as continuous monitor codes) will be registered when an intermittent fault occurs. If that fault does not happen again after x number of start/stop cycles, the ECU will erase the code from memory. If the fault is persistent it becomes a DTC.
If you have read pending codes it is advisable to check the codes again after a week or so. If there is no apparent problem with the vehicle it is safe to erase the codes too and check back. But always make a note of any fault codes with the date and mileage of a vehicle.
If the codes read include a DTC then you need to investigate further. This you can either do yourself or advise your garage. If, again, you don’t see an apparent problem (depending n the severity of the code) with the vehicle you can note the codes down and erase them. Then check again after a week or a few days depending on how often the vehicle gets used. If a repair has been made (previous owner) the DTC may just not have been reset after the repair.