The United States and many other nations (sorry for the US-centricity; I live there and know this whereas I'd have to guess for other nations) consider a nation's sovereign territory to end three nautical miles from the physical coastline. Thus, the U.S. loves to send carrier battle groups to parade up and down three miles from hostile shores when it's in a bad mood. Exceptions to this, according to the United Nations Law of the Sea, are archipelagic nations. These are nations that consist mostly of islands. In this case, the national border is considered to be the three mile limit outside a convex hull drawn around the nation's aggregate land masses.

There are other coastal 'zones' to be aware of...these include (in the US) the ADIZ and EEZ.