Everybody has Reiyoku, or spiritual energy. According to bleach.wikia.com:
Every spiritual being and every Human has a certain amount of Reiryoku. If this amount is higher than a certain degree, it grants the person superhuman abilities. Those with such an above-average level of Spiritual Energy are very rare among living humans. It seems to be that the most basic ability that humans with a higher level of Reiryoku have is the ability to see ghosts: Pluses, Shinigami and Hollow alike. Shinigami are essentially departed souls in Soul Society with very high levels of Reiryoku who receive special training to utilize their powers.
For the Quincies, it appears to be hereditary, as shown by the fact that both Uryu and his father have strong powers.
For Yasutora Sado (Chad) according to bleach.wikia.com:
Originally it was thought that by encountering the spiritual form of Ichigo Kurosaki constantly, Sado's natural spiritual powers were pulled from the depths of his soul. This power is actually a product of Fullbring.
For Fullbringers according to bleach.wikia.com:
they each have a parent who survived a Hollow attack before they were born. As a result, traces of the Hollows’ power remained in their mothers’ bodies, which were then passed onto them at the moment of their birth.
For other characters, it sometimes isn't completely clear or explained why they have their abilities, other than that they intrinsically have a high level of Reiyoku.
To summarize, there are a number of different ways that humans become able to see ghosts and Hollows and interact with them (as Chad, Orihime, etc. do).