To make an AJAX request, follow these steps:
1. Create an instance of the `XMLHttpRequest` object:
```
var xhr = new XMLHttpRequest();
```
1. Set the HTTP method (e.g. GET, POST, etc.) and the URL:
```
xhr.open(‘GET’, ‘http://example.com/data’);
```
1. Set any request headers required by the server:
```
xhr.setRequestHeader(‘Content-Type’, ‘application/json’);
```
1. Define a function to handle the response:
```
xhr.onload = function() {
if (xhr.status === 200) {
console.log(xhr.responseText);
} else {
console.log(‘Request failed. Returned status of ‘ + xhr.status);
}
};
```
1. Send the request:
```
xhr.send();
```
This example is fetching data from the server using a GET request. For a POST request, you would need to include a request body and specify the content type in the `setRequestHeader` method.