Skill points are generally earned though leveling up your character. Generally, the amount of points you gain to allocate depends on what level you are. In Mass Effect, every time you level up you gain a couple points to put into your skills. Many games that use skill points, use it similarly to Mass Effect
does the same, every time you level up after level 5, you gain one point to assign to a skill in your skill tree.
There are other games though, like Demon Souls
, where when you have points to allocate, you put then into your stats. The same goes for Castle Crashers
Point allocation allows for replayability and and let's the player really make a character of their own. You can't usually max the character in every skill or stat, which helps add to that replayability. In Borderlands, in order to max a character, you would need to gain 105 points as you play, but the most points you ever get per character is 45. Forcing you to make careful decisions every time you level up, or play the game multiple times.
Often times in games with skill points, there are multiple classes. All previous examples hold true to that.
Depending on the game, there are different types of skills. In some games you are directly choosing what skills you are investing in the quickest. In games like Mass Effect, the points you gain are slotted by you, but in games like Lost Odyssey
you have slightly less of a choice. You gain points, but in a less direct way. Every time you fight and win a battle, you get a certain amount of what is basically skill experience. Every character who is currently equipped with an item that is having them learn a skill receives that EXP towards whatever skill they're currently trying to learn. Tales of Vesperia
has a similar system. You cannot affect the stats or skills directly. Only through winning battles will the skill EXP bar fill up.