The keys are the most "personal" part of the piano for the player and is quite literally "where the rubber meets the road." While it is always preferable to maintain the original ivories by replacing/repairing keys as needed, sometimes there is too much overall damage, with the keys needing to be replaced with newer (plastic) materials.
Keytop: A key covering of ivory in the case of older pianos, or synthetic plastic in more modern pianos which covers only the top and front surfaces as a veneer to the key.
Most experienced players prefer the Ivory keytops that were popular from the 18th century through the middle of the 20th century.
Ivory became illegal as real Ivory can only be harvested from Elephant or Walrus tusks. Truth be told, the feel of real Ivory is unrivaled. It has a very slippery, smooth, buttery feel to it and the fingers never stick to Ivory keytops.
The proper adhesive used to adhere the the keytop to the keys is called Ivorine Cement sold by piano repair parts stores. It is similar to rubber cement but thinner yet pliable/flexible.
Ivory keytops were made in three sections: the tail, the top and the front. Modern plastic keytops are typically one molded piece.
The easiest way to tell the difference is real Ivory tends to discolor unevenly whilst plastic is uniform in color.