There is another reason which doeshas not seem to bebeen mentioned - the cassette gearrear hub uses a ratchet mechanism which grabs the wheel in one direction and spinslets it spin free (coast) in the other.
There canwill be two or more of these spring loaded wings"wings," called pawls, that grab on teeth inside the cassettefreehub body or freewheel, this is where the clicking sound comes from. In some cases, because of defective parts or bad assembly the ratchet may not be working (stucke.g., a stuck spring or, a missing one of theor broken pawl, or broken ratchet gearsteeth). YouThen you will get a skipping action onin the chaindrivetrain but the chain itself is not jumping over teeth or trying to change gears. In fact you wont see the chain jump at all. The skipping will happen more when you reverse directions of the pedaling. The skipping is the chain cassette gearpawls moving all at once until they catch again on the ratchet grabs on.