In the NBA, a team can release a player from the roster at any time, when this is done they are placed on unconditional release waivers. What this means is that they are placed on the "waiver wire" in which any other team in the NBA can claim him as their own. If the player is claimed they leave the team they were released by for that claimed him. However, if the player goes unclaimed they become a free agent and can sign with any team they want on a completely new contract. This means they have "cleared waivers" and their old contract is paid by the team that released them depending on specifics in their contract. If multiple teams claim a player the team with the overall worst record to claim him is granted his rights.
A player is placed on release waivers and is on the waiver wire for 48 hours and after that point, if they are unclaimed they become a free agent. Any team that claims a player must pay him his current contract. Again, if the player goes unclaimed they are a free agent and can sign a new contract anywhere they please while getting their old contract paid by their old team.
Although this is not the most effective or popular way to obtain players, there have been many successful waiver claims in NBA history. Recently names like Jeremy Lin and Steve Novak have been claimed on waivers and gone on to have great success with their new team. Sometimes the biggest additions to your team could be the player you least expect, like, a player claimed on waivers.