Vitamins are tiny little molecules which we, as humans, cannot synthesize on our own. We need to acquire them by eating things around us. Pretty much every vitamin is a “cofactor” or a “coenzyme” (these terms mean the same thing). Scientists discovered that in the absence of certain tiny molecules, important enzymes would not work! Hence, they called these molecules “cofactors” or a “coenzymes”.
So, in the future, when you come across a vitamin, you can say to yourself, “Oh, right! Without this tiny little molecule, certain essential enzymes of the human cell don't work!”
Note that vitamins are not defined “chemically”; vitamin is a functional definition; that is, we have said nothing about the organic structure or chemical composition required to be a vitamin; only that a vitamin is any small molecule which (1) cannot be synthesized by the human body but which (2) is required for normal processes and, thus, (3) must be obtained from the diet!