"margin of the land," early 14c.; earlier "rib as a part of the body" (early 12c.), from Old French coste "rib, side, flank; slope, incline;" later "coast, shore" (12c., Modern French côte), from Latin costa "a rib," perhaps related to a root word for "bone" (cf. Old Church Slavonic kosti "bone," also see osseous).
Latin costa developed a secondary sense in Medieval Latin of "the shore," via notion of the "side" of the land, as well as "side of a hill," and this passed into Romanic (e.g. Italian costa "coast, side," Spanish cuesta "slope," costa "coast"), but only in the Germanic languages that borrowed it is it fully specialized in this sense (e.g. Dutch kust, Swedish kust, German Küste, Danish kyst). French also used this word for "hillside, slope," which led to verb meaning "sled downhill," first attested 1775 in American English. Expression the coast is clear (16c.) is an image of landing on a shore unguarded by enemies.