There are two types of testing that must generally be done on a new electronic product, safety and emissions testing. In addition, if you have a medical product, then there are additional standards you must follow.
In the US, UL (Underwriters Laboratories, a private testing laboratory) requires third party safety testing to be performed before a UL mark can be placed on a product. It is not legally required to have a UL mark, but most major retailers (Walmart, Best Buy etc.) will not carry a product in its stores without one.
Part of the UL test includes ESD (electrostatic discharge) where they zap 6,000 to 8,000 volts into any connectors or other open spaces in your case, and verify it doesn't fry anything. Fun!
The FCC (Federal Communications Commission) requires that certain emissions tests be performed on electronic equipment. As a result of recent rulings, testing does not not actually have to be performed; the manufacturer can self-certify that the devices meets the requirements.
There are two categories of devices: unintentional radiators, and intentional radiators. Unintentional radiators are devices which are not intended to produce radio waves, but which may do so anyway, like an MP3 player. Intentional radiators are devices which have radio transmitters built into them, like a smart phone which contains a cell modem and maybe a Bluetooth modem also. EMC (electromagnetic compatibility) testing assures devices do not interfere with each other.
Although you may be able to self-certify an unintentional radiator device, it is not a good idea to self-certify an intentional radiator unless your company has the necessary equipment (and know-how) to guarantee compliance (we're talking $50,000+ of test equipment plus an anechoic chamber). If you are caught by the FCC with a non-complying product the fines are very stiff.
These electronic devices must be tested such that they do not cause harmful interference to other devices, and that they can accept harmful interference from other devices.
In the US, medical devices are under control of the FDA (Food and Drug Administration). Before you can sell a new medical device, you must submit a very detailed application to the FDA called a 510(k). One application I contributed to for a fairly simple product a couple of years ago ran almost 600 pages. Before submitting, you have to have all of your other testing (with passing results) out of the way.
Testing is relatively expensive. Getting a UL mark will cost several thousand dollars, $10K is not unusual. Emissions testing for the FCC is more expensive, particularly for intentional radiators; $20K is pretty common and I've seen where it can run over $100K if one or more board spins and retesting are required to fix problem areas. There are no third-party FDA tests per se (it is a matter of providing both third-party and in-house test results and other documentation to the FDA), but the cost of doing the in-house testing (which may require medical trials) and preparing the 510(k) can run quite a bit.
In Canada, the equivalent to the UL mark is the CSA mark. You can get a combined mark called the C-UL.
In Europe, this has been all rolled up into one set of standards, called the CE (European Conformity, in French its backwards) mark. So the CE mark is the equivalent of the UL safety testing, and FCC testing (per a EMC Directive which is part of the CE standards). Likewise, the medical testing is controlled by the EMEA (European Medicines Agency) but the compliance is rolled into the CE mark too.
Like the FCC mark in the US, a company can self-certify their compliance with the applicable CE standards; however to do so, they must supply a lengthy Technical File to support the certification, and in many cases it is probably better to have a third-party lab test their devices and write the report.
If a company is getting certified in both the US and Europe, the standards are similar enough that the test lab can do both at the same time.
In China, the equivalent testing standard is the China Compulsory Certificate mark. Like the CE mark, the CCC mark can include safety, EMC, and medical testing certification (the latter controlled by the CFDA — China Food and Drug Administration).
I'm not familiar with a CEC mark. Googling it, it appears to be associated with battery chargers.