How ajax prevents page refresh?

I understand why we use ajax, asynchronous in JS. But want to know how ajax prevents page refresh ? How it does that ?

Because once you get the data, you adjust the HTML on the page using JS rather than navigating to a new page. AJAX is a technique for fetching data, it doesn’t prevent page refresh