Cape Cod ( or simply the Cape ) is an arm-shaped peninsula located in the eastern part of Massachusetts . The elevation of Cape Cod is from , at the top of Pine Hill , in the Bourne portion of the Massachusetts Military Reservation to sea level . The body of water located between Cape Cod and the mainland , bordered to the north by Massachusetts Bay , is Cape Cod Bay ; west of Cape Cod is Buzzards Bay .