Resignation was the act of leaving certain occupations, including being a Starfleet or Bajoran Militia officer. In Starfleet, one usually gave his letter of resignation to his commanding officer, who would then forward it, if accepted, to Starfleet Command.
In 2365, Data resigned from Starfleet to prevent his examination by Bruce Maddox. Maddox then challenged Data's right to resign seeing him as property of Starfleet, but was defeated in court. (TNG: "The Measure Of A Man")
In 2371, Odo planned to log in his resignation "within the hour" due to the arrival of Michael Eddington. On the request of the Bajoran Provisional Government, he still travelled to the Gamma Quadrant aboard the USS Defiant and later decided to stay in the Militia. (DS9: "The Search, Part I")
Later that year, when the female Changeling (posing as Kira Nerys) ordered Odo to leave her in apparent mortal danger, Odo replied that he resigned his commission and would stay with her. (DS9: "Heart of Stone")
In 2372, Worf handed in his resignation to Captain Sisko, but Sisko refused to accept it due to the ongoing Klingon-Cardassian War. Worf later retracted the resignation and became Deep Space 9's strategic operations officer. (DS9: "The Way of the Warrior")
The same year, Sisko offered to resign to Jaresh-Inyo if his allegations against Admiral Leyton were false. Jaresh-Inyo assured Sisko, if Leyton was guilty, he would make Leyton resign. Later, when Leyton's conspiracy was revealed, Sisko asked for his resignation. Leyton initially refused, but later complied and removed his pips. (DS9: "Paradise Lost")
After his augment status was revealed in 2373, Julian Bashir planned to tender his resignation to Captain Sisko before he would be discharged from Starfleet. His resignation became unnecessary when his father agreed to go to prison. (DS9: "Doctor Bashir, I Presume")