Roughly:
You yourself first need to organise that you're allowed entry in the US. When you're not automatically qualified that might mean you'll need to provide all the personal information necessary to obtain a transit or other visa and if you're qualified for the visa waiver program you still need obtain an ESTA and will need to provide the necessary personal data.
The airline needs to collect (well enough in advance) enough personalia (from you) to complete the requirements for the advanced passenger information system (APIS) and/or the US Customs and Border Patrol (CBP) to know if they can allow you to board.
Typically what the airline is required to provide is a combination of Passenger Name Record (PNR) data , the information found on the front page of your passport and your U.S. destination address.
Passenger Name Record (PNR) data
Source: https://www.cbp.gov/travel/clearing-cbp/passenger-name-record
What information is collected:
PNR information obtained from commercial air carriers and ... may include some combination of the following categories of information, when available:
PNR record locator code.
Date of reservation/issue of ticket.
Date(s) of intended travel.
Name(s).
Benefit information (i.e., free tickets, upgrades, etc.).
Other names on PNR, including number of travelers on PNR.
All available
contact information (including originator of reservation).
All
available payment/billing information (e.g. credit card number).
Travel itinerary for specific PNR.
Travel agency/travel agent.
Code
share information (e.g., when one air carrier sells seats on another
air carrier's flight).
Split/divided information (e.g., when one PNR
contains a reference to another PNR).
Travel status of passenger
(including confirmations and check-in status).
Ticketing
information, including ticket number, one way tickets and Automated
Ticket Fare Quote (ATFQ) fields.
Baggage information.
Seat
information, including seat number.
General remarks including Other
Service Indicated (OSI), Special Service Indicated (SSI) and
Supplemental Service Request (SSR) information. Any collected APIS
information (e.g., Advance Passenger Information (API) that is
initially captured by an air carrier within its PNR, such as
passport number, date of birth and gender).
All historical changes
to the PNR listed in numbers 1 to 18.
Not all air carriers maintain the same sets of information in PNR, and
a particular individual’s PNR likely will not include information for
all possible categories. In addition, PNR does not routinely include
information that could directly indicate the racial or ethnic origin,
political opinions, religious or philosophical beliefs, trade union
membership, health, or sex life of the individual. To the extent PNR
does include terms that reveal such personal matters, DHS employs an
automated system that filters certain of these terms and only uses
this information in exceptional circumstances where the life of an
individual could be imperilled or seriously impaired.
(emphasis mine)
Advanced Passenger Information System (APIS)
Source: https://www.cbp.gov/sites/default/files/documents/apis_factsheet_3.pdf
Overview
A new predeparture Advance Passenger Information System (APIS) requirement allows the Department of Homeland Security (DHS) to
review passenger information prior to boarding for commercial flights
arriving into or departing from the United States and for commercial
vessels destined for or departing the United States.
Purpose
The advance transmission of this information, coupled with Passenger Name Record (PNR) data, will provide DHS the ability to identify potential threats and coordinate with carriers and foreign
law enforcement to prevent the boarding of a person of interest. APIS
The Advance Passenger Information System (APIS) is a widely used
electronic data interchange system that allows carriers to transmit
traveler data to CBP. APIS data includes passenger information that
would be found on the face of a passport, such as full name, gender,
and country of passport issuance.
(emphasis mine)
And finally:
Carriers should make every effort to ensure the address information they collect and submit to CBP via APIS, is identical to the U.S. destination address declared to CBP by the passenger upon application for entry (for I-94 purposes). Carriers should also make every effort to ensure the address submitted in the APIS manifest appears to be a valid address.
Below is clarification on what information should be included on the manifest for those passengers who are: (1) visiting the US; (2) joining a cruise ship; (3) picking up a rental car or; (4) those not knowing their address while in the United States:
...