On the flight, you may be given a customs form. Some US airports have you complete them electronically. Listen to the inflight announcements for directions.
Make sure to have a pen in your hand luggage. All travellers to the USA are required to fill this out. At some airports this is a digital form you will fill out in the customs hall.
Ask your flight attendant before landing if you do not receive one. The immigration officer you meet upon your arrival will stamp it and return it to you.
On leaving the baggage hall, after picking up your luggage, you will give this form to a customs officer.