What is $http in AngularJS, and how is it used?

$http is an AngularJS service for making HTTP requests, allowing data retrieval from external APIs.

$http.get('/api/data').then(response => {
  $scope.data = response.data;
});