The official website for The Settlers of Catan

Question about “Seafarers” Expansion Ships - When is a ship “open”?

Answer

A ship is “open” when it is located at the end of a shipping route. As soon as a shipping route connects two settlements, the shipping route is considered as closed. A ship in a closed shipping route cannot be moved.
This rule also applies if an opponent builds a settlement on an intersection of your closed shipping route. In this case, your continuous trade route is considered as interrupted; however, the two settlements of the shipping route are still connected, meaning that the shipping route remains closed.