Can you become faculty at your PhD granting institution? Is it true that if you get PhD from an institution, then it becomes very hard to become a tenure track faculty position at the same institution?
In theory, anyway, academia is very much like human biology: inbreeding and incest ought to be avoided because drawing from such a small pool of genes and backgrounds is likely to cause problems. Mixing it up benefits any area of inquiry: people whose training was from a diversity of institutions/supervisors/influences bring in new ideas and frameworks, and can keep a line of research from unwittingly falling into a rut when it comes to the lines of analysis being used.

Sometimes Ph.D. graduates of an institution are brought in out of necessity. If a department wants to hire a second faculty member in a very, very small subfield, for instance, the pool of applicants is likely to include a lot of Ph.D. graduates who worked under the first. That's pretty inevitable. This is, to extend the analogy, as if the human population has been reduced to 10 or 20 people and most of them are relatives. If there's no other choice, marrying cousins and siblings has to be done.

But those cases are the exception, in my experience. Within my field there are 3 or 4 departments in North America that have become notorious between 2009 and the present day for heavily favoring their own Ph.D. graduates (to the point where if the shortlist gets leaked, you can predict who's going to get the position from that and the job talks have only a small effect). It makes sense that departments want to look out for their own, and it also makes sense that if a department already has a good sense of someone being impressive, that's difficult for an outsider to challenge. But to return to the analogy, it's like marrying a pair of siblings to each other because they're both looking for a partner and already know each other and get along. In both cases, people will talk. In both cases, a reputation will be earned that is not good. The last time one of the 3 or 4 departments in question was looking for a new tenure-track faculty member and someone from the department anonymously shared the shortlist with a bunch of mailing lists, one of my colleagues made an extremely cynical, almost mean-spirited prediction that made me shake my head at the time and then ended up being entirely accurate.

So yes, it is absolutely possible for someone to end up working at the institution where they did their Ph.D.; but unless there are extenuating circumstances, people are likely to think less of the department in question for hiring its own. It benefits every department not to default to someone they already like and someone whose ideas are comfortable and familiar to them.