Cogs, wheels, cogwheels, cog wheels, sprockets, etc.?
Cog traditionally referred to the individual teeth on the cogwheel. Here is the first definition in "cog, n. 2" in the Oxford English Dictionary:
One of a series of teeth or similar projections on the circumference of a wheel, or the side of a bar, etc., which, by engaging with corresponding projections on another wheel, etc., transmit or receive motion.
A wheel with cogs would be more specifically called a cog-wheel. The OED again, "cog-wheel, n.":
A wheel with cogs, used to transmit motion; more generally, a toothed wheel which engages with another similar wheel, or with a toothed bar or rack; a gear-wheel.
Now, you've posited several other options for what these items may be called. Languages often generate synonyms or hyponyms (more specific words) for the same item. Here are a few for cogwheel:
Cog: Yes, by the 18th century some English users had shortened cogwheel to cog and used that to refer to the entire wheel apparatus. From "cog, n. 2":
1712 J. Browne tr. P. Pomet et al. Compl. Hist. Druggs I. 54 The great Roller in the middle is surrounded with a Cog.
Sprocket: A term for a kind of cog-wheel that meshes with a chain; note that some cog-wheels work with other toothed parts like belts or other cog-wheels (OED, "sprocket, n."):
b. A wheel equipped with projections along its rim that are used to engage with the links of a chain, the perforations along the edge of a strip of film, etc.
Gear or gearwheel: cog-wheels that work upon each other (OED, "gear, n."):
b. Wheels working one upon another, by means of teeth, or otherwise. a train of gears: a set of such wheels
Cogwheel is virtually identical to cog-wheel. The OED uses the hyphen; Merriam-Webster omits it.
Finally, people mix these uses all the time. I couldn't have told you the exact difference between a sprocket, a cog, and a cogwheel without looking it up. Unless you're working in a highly technical context or enjoy linguistic trivia, I wouldn't worry.