It started long ago when everyone thought you could be good at Math, or good at History, or good at Science, and sometimes good at all 3.
One day Suzy(named changed and story overly simplified for explanatory purposes), a very smart math teacher, was promoted to principal. So she finally had the chance to look at students grades from every class. And she found something curious. Her students that succeeded in her Math class also succeeded at Science. And kids that did well at History, scored highly in English. So Suzy decided to call these newly discovered traits "Verbal Ability" and "Quantitative Ability" respectively.
But Suzy didn't stop there, her investigations found that Verbal and Quantitative were correlated with each other. So she invented a third trait which was the combination of Verbal and Quantitative ability and she called that g for General Intelligence. Of course Suzy wanted to measure this g with a test so she could predict(though by no means perfectly) a student's Math, Science, English, and History grades from just one score. She settled on IQ as the measure of this test, and thus IQ was born.
Basically when we give someone a whole bunch of different tests we find that if someone does well on one, they will probably do well on others. For instance if we know someone is really good at theoretical physics we know they'll be good at working memory, and solving silly matrix puzzles. But if we know someone is really good at poetry we don't know as much about how good their working memory is, or how good they are at solving silly matrix puzzles.