A few games allow you to change the type of a unit.
For instance, you might have this ability in a construction-oriented game, where you can take a town that has accumulated sufficient building materials and change it into a city. Another possibility is that you have increased your technology level and are now able to transform a low-tech ship into a higher-tech ship.