Make stuff up, but look to existing content for guidance
First, look at existing classes. They are fairly formulaic. In the first 3 levels you get your core features. At level 4 and around every 4th level after you get an ASI. The easiest way to make a new class is to find the class that is most similar to the one you want to make, then modify it from there.
If you want your new class to be balanced, you will need to compare it with existing classes, and play test it to find problems. The same is true for each feature.
That's about it.
Example
Let's try invent a new class. How about something based on the Pied Piper? He's a neat character. He can charm and control creatures. Reading into his lore a little more, he could be an allegory for child slave trade, the grim reaper guiding souls to the underworld, the inevitability of death, mass hysteria, or dark religious fanaticism.
Since music affects a large area, I want to factor that into their spell-casting:
Reverberation (level 1 feature) When casting a cantrip, you can cast the same cantrip again for no cost. When cast this way, neither cantrip deals damage. You can choose a different target for this additional cantrip.
At 5th level you can cast the same cantrip again twice, at 10th level 3 times, and at 15th level 4 times.
Melodic Propagation (level 3 feature) When casting a spell using a slot at least 1 level higher than the spell's level, you can forgo any bonuses the spell has for being cast at a higher level, and instead cast the spell an additional time. You can choose a different target for this additional spell. When cast this way, each spell's level is the level of the spell, not the level of the slot used.
At 8th level, if you use a slot at least 2 levels higher, you can forgo the spell's bonuses to cast it an additional 2 times. At 17th level, if you use a slot at least 3 levels higher, you can forgo the spell's bonuses to cast it an additional 3 times.
I selected the advancement levels based on other class features (extra attack, bardic inspiration, etc). Ok cool. Now we have to throw in the rest of the minor stuff like proficiency, and other flavorful features, select a spell list for the class, etc.
After that, play testing. I just pulled these ideas after my head after all, who knows if they are balanced. A good thing to do might be to post on this site so people can point out any flaws or unclear wording.