AMS is Schiphol airport in Amsterdam. It's called Amsterdam Airport Schiphol. Search engines usually let you search either by the airport name directly, or by the city.
The airport name is sometimes given as one, sometimes as the other, most of the time as a combination.
Rail planners make this a mess more often than air search sites, as those mostly give the three letters AMS, with the name.
This is to make things easier for people when searching, since some airport names are quite complicated, for example "Bandaranaike International Airport" in Colombo, Sri Lanka. People can search by that, or by "Colombo". Note, when searching by the city name, and if the city has more than one airport, the search engine will list all flights available for any of the airports in that city.