NBA uses a soft cap, which means you can go over the cap only to sign your own players.
Hypothetical Example Using Fake Numbers:
$100,000,000 Cap
$117,000,000 Celtics total salary after going over cap to sign their guys.
- $20,000,000 Kyrie’s salary
This would bring the Celtics to $97,000,000 with $3,000,000 to spend on the open market.
Again, these are fake but easy to understand numbers.