Ink has been in use for a really long time, since (around) 2500 BC or so. There have been many different types of inks used over millennia. The earliest inks were carbon suspensions.
Nowadays, the ink formulation is complex and generally the ink is composed of dyes or pigments (to impart color), polymers (for stabilization of pigments or dyes and prevent clotting), liquid solvents (for pigment, polymers and other components), pH modifiers, humectants (prevent drying), wetting agents (controls surface properties), etc. The commonly used dyes and pigments include, eosin (red color), substituted triphenylmethane (blue color), titanium dioxide (white ink), etc. Commonly used solvents include, alcohol, toluene, propylene glycol, etc.
Depending on the end use, the components may be different. For example, the composition of writing ink and printing in would be different. Similarly, fountain pen ink, marker ink and ballpoint pen inks may be different.
Hope this helps.