Unlike other sports like baseball or soccer, basketball has always included a playoff format at all levels that includes teams qualifying without finishing in first place in the standings. This requires extra rules about who gets what seeds in the playoffs, especially when it comes to settling things like tie-breakers. These rules can always vary depending on the individual league, but there are rules that almost all leagues follow because of familiarity.
Teams are generally ranked in the standings based on wins and losses. All games are played until there is a definite winner, so there are never any ties on a team's record. On rare occasions, a league may institute a points system for the standings, awarding a team three points for winning a game plus an extra point for each individual period of the game that the team won and ranking the teams based on total points. The Continental Basketball Association was one such league to employ this system.
The number of teams in the league that qualify for the playoffs is set by the individual league and largely depends on how many conferences and/or divisions the league is split into. If a league is split into multiple divisions, the teams that finish in first place in the divisions all qualify for the playoffs and usually get the top seeds, followed by the number of teams with the next best records needed to fill out the playoff seeds. For example, the NBA's 30-team league is divided into two 15-team conferences, which are each divided into three five-team divisions. The division winners in each conference plus the team with the next best record get the top four seeds in their conference playoffs. The next four teams in the conference also qualify for a total of eight playoff teams in each conference.
Each league will usually have a set of tie-breaking rules to separate teams that finish with identical records. The first tiebreaker is almost always the head-to-head record between the teams that are tied--whichever team had the best record that season in the games the two teams played against each other gets the higher seed. If the tie can't be settled that way, the next tie-breaker is usually the teams' records against all the teams in either their division or conference. Tie-breakers past that point can vary depending on the league and can include things like the team's average margin of victory for the season or average points scored.