Does NASA know the location of every object in orbit and they calculate satellite and shuttle launches around not hitting these objects or are they just rolling the dice that the probability of hitting something is so small they are willing to take the risk?
Douglas Adams summed it up perfectly "Space is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to space."
So first up, orbit is quite large, any individual orbiting item is fairly small. (ISS is a singular counter example as probably largest other item. However many sizes exist).
The ISS specifically is moved to avoid near passes by tracked space junk on a fairly regular basis.
There have been collisions, and they are bad because they usually leave behind thousands of shards in similar orbit. (Iridium I believe lost a satellite in this manner).
There is a possible scenario called the "Kessler Syndrome" where a cascade of collisions could some day occur. One collision generates enough debris such that more collisions occur, until it is next to impossible to access near Earth orbit.
We are thankfully not even close to that.
The Chinese ASAT test that blew up a satellite left a lot of debris in orbit, which was not a good thing.
New proposed LEO constellations like StarLink (4400 satellites) and OneWeb (882 satellites) will significantly add to the issue.
The US Space Command does track orbital debris down to the smallest size they can track, but they cannot watch everything.
So to summarize. Orbits are selected to avoid known debris. Collisions have happened. The ISS is regularly maneuvered to avoid debris.