Have you heard of the riddle of Theseus's ship? The story is as follows:
"The ship wherein Theseus and the youth of Athens returned had thirty oars, and was preserved by the Athenians down even to the time of Demetrius Phalereus, for they took away the old planks as they decayed, putting in new and stronger timber in their place, insomuch that this ship became a standing example among the philosophers, for the logical question of things that grow; one side holding that the ship remained the same, and the other contending that it was not the same."
Some variants of this puzzle add that over time every component of the ship is replaced and the original components are assembled into a second ship. This variant then asks which ship is Theseus's.
The story is usually presented as an ontological problem... but it isn't. It is really an epistemological problem. This mistake is at the heart of all problems around thinking about the ship of Theseus.
A Little Bit of Ontology
Ontology is a subset of metaphysics, and answers the questions "what is the nature of material existence?" Ontologically, all things that exist have an identity, or qualities. And an existent has the qualities it has because of the kind of thing it is. A ship, like Theseus's ship, is a physical existent, and therefore has qualities. Some of those qualities are "intrinsic", meaning they are part of the ship, and other qualities are relative, meaning there are not part of the ship. The intrinsic qualities are what make the ship an ontological existent, and is all the qualities of all the physical attributes of the ship (the planks, nails, ropes, sails, and all such physical things). These intrinsic qualities, though, do not make the ship a ship, just a physical entity. What makes any particular physical entity a ship are its relative qualities, which are all those qualities determined by an entity's relationship to other existents, both physical and conceptual.
A Little Bit of Epistemology
Epistemology is the study of the nature of knowledge. Epistemologically, the concept for the word "ship" identifies a particular type of physical existent that has been made by man to have certain physical attributes and to perform a certain purpose. The attributes are all those physical attributes that a ship must have to be a ship, such as having a hull and displacing water such that it doesn't sink. The purpose of the ship is what it is made for, which is sailing.
An entity is what it is, regardless of what (if anything) is known about it. An ancient artifact discovered by archeologists has an ontological nature and is what it is, even if the archeologists do not know what they've discovered or what purpose it once served. That which makes a physical entity a ship, its essence, is not ontological, but conceptual. A physical entity is a ship if it is identified by the concept "ship".
To understand what is wrong with the story of Theseus's ship it is necessary to know what a concept is. A concept identifies existents. Existents, are any thing that exists ontologically or epistemologically. So... what does that mean? A concept is a mental construction that acts like a finger pointing at what it means. A concept is made of several parts: a symbol, a definition, and a meaning. The symbol is something humans can perceive (see, hear, smell, touch), such as written, spoken, or signed words, such as the word "tree". The definition describes the meaning in words, such as "trees are plants with bark and leaves". The meaning is the existent or existents the concept identifies. For example, the meaning of the the concept "tree" is all actual trees--the concept tree is like a finger pointing at all trees. The meaning of concept "the tree in my garden" is the actual tree in my garden-- the concept "the tree in my garden" is like a finger pointing at only that tree in my garden.
The concept "Theseus's ship" identifies a particular physical existent that has the essence of a ship and also has an additional relationship--it is owned by Theseus and was sailed by him on his adventures. While Theseus owns his ship, any changes to that ship (such as replacing a rusty nail) do not change that fact the ship is Theseus's ship (like if I replace the spark plugs in my car, that car is still a car and still my car despite having changed in some way). If Theseus replaces part of the ship (like an individual nail) the ontological nature of the ship is different, but the epistemological essence of the ship does not change and the relation of the ship to Theseus does not change—it is still Theseus's ship. Even if, gradually over the duration of his travels, Theseus replaced every component of his ship, the concept "Theseus's ship" still identifies the ship he is sailing.
Answering the Riddle
There are two meanings of "Theseus's ship" in the story, but the question "is it still Theseus's ship" is only a riddle if there is one meaning of "Theseus's ship". If it is (correctly) recognized that there are two meanings in the story, then the riddle dissolves.
This is where the mistake is made. The same words, "Theseus's ship", are used as symbols for two related, but different, concepts. In the story the first usage of "Theseus's ship" is to mean "the ship that that Theseus owns", and the second usage of "Theseus's ship" is to mean "the ship that historically was owned by Theseus and now is preserved by the Athenians."
"Theseus's ship" in the first sense, the "ship that Theseus own", is gone. It is no more. However, "Theseus's ship" in the second sense, the "historic ship that is preserved by the Athenians," does still exist and is still identified by that concept, regardless of how much of that ship has been replaced as part of its preservation.