As the sounds bounce off objects it creates an echo. The bat then listens for the echo to return. By listening to where the echo comes from, the bat can avoid obstacles in its path or locate some juicy bug to eat. For some reason, many people are afraid of bats. But the truth is bats can be very helpful.
Bats eat hundreds of thousands of tons of destructive insects each year.
And just like honeybees, bats are responsible for pollinating certain types of flowers. Bats can carry some diseases, but the chances of transmitting the disease to humans is very, very rare. While I wouldn't want them in my attic, having a few bats live near your house shouldn't be a cause for worry and can be exciting. As with all wild animals, do be careful. If you find a single bat lying on the ground during the daytime it is probably sick.