Bats are not usually a problem for most people. In fact they are actually a good thing. They eat bugs such as mosquitoes that spread diseases. However, if they've made taken up residence in a house, it can get a bit unsanitary because of droppings they leave. Unfortunately for humans, bats seem to be sentimental to a home. They will come back to them time and time again even if they've been transported hundreds of miles away.
Professional exterminators will come out and remove the animals, sealing off the entrance that the bats are using to get into the home. Some will exterminate the bats, which is not good for the ecosystem and others will release them. The representative will then clean up the mess that was created by the winged animals.
On Your Own
Don't use poison. You will just end up with a bio-hazard of dead animals to clean up and more bugs in your back yard.
Instead, find the entrance that the bats are using and install exit only doors or flaps over all of them. This way the bats will be able to leave the house but not come back in. Leave these doors up until you are sure that all bats are out. Next, take the doors down and repair or seal the areas that the bats were using to enter the home. Once all holes are sealed, the bat infestation is over. However you will want to check the rest of the home and out buildings to insure they don't find another way in or another nesting place. Lastly, clean up the mess left behind by the bats.