how do they know the direction and what object the waves are coming from?
'know' is a strong word. We don't 'know' there's anything like a black hole, though it's probable.
With plenty of measurements, it really works like this - you start out with a theory of how things are. That theory allows you to compute what signals your detector ought to observe if your theory is true.
Then you switch the detector on - and if you see what the theory says, you tend to believe in the theory more than before.
Of course, every now and then it happens that someone else comes with a
different theory that explains the same signals. In which case people try to come up with a different experiment that ought to distinguish between the cases.
Generally it's an ongoing process in which theories are strengthened or undermined and after a few decades, some turn out to survive. The whole thing is usually mis-represented in popular science or press announcements, speaking with a certainty that really isn't there.
People believe in black holes because General Relativity predicts them, and General Relativity has predicted quite a number of other observations correctly - though there are alternative theories to GR around as well (in which there might not be black holes at all).
So LIGO found that particular signal because it's what people were expecting based on the theory, and if the real signal of black hole mergers would be any different, they actually might have missed it on the grounds of not looking for it (this is actually a real concern at particle accelerator experiments - they can't simply 'find' things - if something is not in the search raster, it gets files as noise and discarded). And the 'knew' it'd be black holes because the theory said so before.