A starship was any manned spacecraft that was capable of viable interstellar travel, i.e. any manned spacecraft that has the ability to transport and support a crew across interstellar distances. Most starships accomplished this via the employment of some form of faster-than-light spacecraft propulsion technology, such as warp drive.
In the Federation during the 22nd and 23rd century, spacecraft of the Starship-class were identified exclusively as vessels operated by Starfleet, or as stated by R.M. Merik, "a very special vessel and crew". (TOS: "Bread and Circuses") By the mid-24th century though, the exclusivity of the term "starship" essentially fell out of use, and was redefined as a term interchangeable with spaceship and spacecraft. (Star Trek: The Next Generation, Star Trek: Deep Space Nine, Star Trek: Voyager)