A ground assignment or shore duty was a posting on the surface of a planet, as opposed to space duty aboard a starship.
In 2267, after citing Captain James T. Kirk's apparent culpability in the death of Benjamin Finney, Commodore Stone offered him an ultimatum – either accept a permanent ground assignment, or face Starfleet Command's discipline. Kirk chose to fight the charges in a court martial. Later, after initially calling Kirk a murderer, Jame Finney apologized for her grief-induced outburst and begged Kirk's lawyer, Samuel T. Cogley, to make Kirk change his plea and take a ground assignment instead, as she no longer blamed Kirk for her father's death. (TOS: "Court Martial")
After being reassigned to his new posting at Deep Space 9, Commander Benjamin Sisko attempted to nullify his son Jake's desire to live on Bajor instead of "some old space station", his father explained that "the station is in orbit of Bajor. It'll be just like shore duty." (DS9: "Emissary")