They are incredibly rare. Research has shown they might actually be related to dryads (which are kind of biological themselves). What is known is that if enough magic, intent, and emotion is pushed through an inanimate object, that object begins to animate to some extent. Usually, this is at a small enough scale that the resulting object can’t be described as fully sentient and they certainly don’t function as a species. More like a more advanced enchantment.
This is different with ships. Large numbers of people with very tight emotional bonds to the object are common. It is also common for there to be a great deal of intent with the operation of these vessels. This combines with the strength of a threshold to form a very strong foundation for channeling magic. Ships are homes for their crew and so have all of the same potential for protective magic as a house on the land. This threshold doesn’t have much magic itself, but it means that very powerful magic can be channeled through the ship by relatively unskilled magic users.
All that is left is to combine all of this with a powerful enough flow of magic and properly direct it through the ship for long enough. The combination is rare but common enough that it has happened several times. Because it requires a steady flow of magic over a long period of time before the ship is sentient and self-sustaining, it is almost impossible to do it on purpose. All known cases have happened by accident.
There is also at least one known case of a ship being able to have children by pairing with an exceptionally powerful magic-user. This is the only known way to intentionally create a sentient warship. The ship that succeeded had a second child later, showing that the process was at least theoretically reproducible with intent. The Royal Navy has attempted to reproduce the process under controlled circumstances in the hopes to mass-produce sentient warships, but the results were not satisfactory. All results were not seaworthy and those that did not immediately sink are restricted to brown-water operations (some strictly non-combat). The HMS Saccharum (the ship participating in the experiments) has refused to conduct further trials. The hypothesis is that similar to spontaneous generation, the act of trying to force reproduction without the key emotional components hinders the process. Because of the amount of magical power required, the chance of finding the right emotional connection in a person with the right amount of power is rare.
In terms of their relations with regular biological life, the ships have a fully symbiotic relationship with their crews. They typically see their crew as family and will feel profound loneliness if they go uncrewed, even for a short period of time. If a ship is in drydock or something similar that keeps them from sailing for a while, it is typical to have someone who is at least nominally the captain around. It’s been shown that even when fully crewed, the lack of a captain can cause a severe amount of distress. Over a long enough period of time, it can turn into a psychosis that bears similarity to schizophrenia.
In WWII, the captain of the HMS Venatrix went MIA during a shore raid. The ship refused a new captain and insisted that the captain not be listed as “Presumed Dead”. Owing to her experience and rank (sentient ships hold ranks of their own in most fleets) the Royal Navy named her as her own captain. Over the next few decades, her mental health steadily declined and she started to suffer from hallucinations. If she was a biological officer, she would have been medically discharged but the Royal Navy was well aware that discharging her would not diminish how dangerous she was and might even provoke a war (she was popular both within their own fleet and in foreign navies, many would be willing to immediately enlist her). Since no incidents resulting from her mental instability were significant, the issue was not pressed.
This came to a head when it was revealed that her captain had not been killed as many had presumed, but that the ship was correct in stating they were still alive. They had been captured by German forces and then handed off to Fascism supporting vampires in Spain as a gift. Because WWII did not actually reach into Spain, when German POWs were released the captain was not and remained a prisoner of the vampires for decades. When the Venatrix learned of this, they were urged to be patient and wait for diplomatic channels to pursue the captain’s release. They rejected this and staged a rescue, burning much of Málaga in the process. The return of her captain saw an immediate benefit to the mental stability of the Venatrix, it just cost Spain as a member of NATO to do it. When interviewed, no other sentient warships found the actions of the Venatrix to be unreasonable.