No matter how you cross the USA/Canada Border (whether starting from the United States, vacationing in Canada and returning to the United States, or whether you start your trip from Canada, spend time in the USA and then return to Canada) you are responsible for having proper documentation with you. Travel between the USA and Canada now requires a passport, or an approved equivalent document such as a Passport Card (land crossings only), trusted traveler card (NEXUS), or an "enhanced" driver's license (shows confirmed citizenship). Birth certificates and most driver's licenses are not accepted. If you plan to fly to or from Canada, only a Passport or a trusted traveler card will be accepted.
If you choose to fly, you and your belongings will be inspected upon arrival at the airport in Montreal, Toronto, or Vancouver, and also upon departure from Canada to your home airport in the United States. If you drive, you, your passengers, your vehicle, and your belongings are subject to search at the border.
Amtrak's trains undergo border checks in various ways, depending on the train and its direction. Going towards Canadian destinations (such as Vancouver, Toronto, or Montreal), your train will be inspected by officers from the Canada Border Services Agency (CBSA). Going towards New York City, Seattle, etc., it will be inspected by a division of the Department of Homeland Security (DHS), the US Customs & Border Protection (CBP). You will be asked to provide documentation showing your nation of citizenship, and your date of birth. You may have your luggage searched as well for contraband.
Amtrak's ADIRONDACK will be stopped at the border in both directions. Going towards Montreal, it will be inspected at LaColle, Quebec (not a station). Towards the United States, the train will be stopped for a while at the station in Rouses Point, NY.
Amtrak's MAPLE LEAF will be stopped at the border in both directions. Going towards Toronto, CBSA will inspect it at the station at Niagara Falls, Ontario. Going towards New York City, it will be inspected by the CBP at the station in Niagara Falls, New York.
Amtrak's CASCADES northbound is not stopped at the border. All Canadian entry inspections, both immigrations and customs, are done at Vancouver's Pacific Central Station. Southbound, US immigrations inspection (passport control) is performed prior to departure at the Vancouver station. Be sure to arrive at the station early enough to clear US immigrations. The southbound Cascades makes a stop near Blaine, WA for US Customs inspection (luggage and belongings).
In addition, when you purchase your tickets for the above three international trains, you will be asked to state your nation of citizenship and your date of birth, and the type of documentation you will present for entry to Canada and the US. If you buy your tickets via the internet, a special panel will ask you these questions. A questionnaire also may be given to you by the train crew as the train approaches the international border. This information is then provided by Amtrak to the personnel at the border.
The CBSA and CBP websites above should answer any questions you may have about what you can take across the border in either direction, such as medications, currency, food, etc.