stop bots to access your site

How we can we stop bots from crawling our websites and use our data.

Do we need all the bots to crawl our sites?