An observer was someone who is tasked with watching and listening to a particular event. Typically this is done for the purpose of ensuring that it unfolds in a particular manner. Observers generally are not expected to involve themselves in the activities they are observing unless asked.
In 2270, Ari bn Bem was take aboard USS Enterprise as an independent observer during a series of Enterprise missions. Though he remained in his quarters during six missions, he chose to come along with the landing party to a potentially dangerous mission to Delta Theta III, a fact James T. Kirk questioned him on. Bem replied that he felt this mission was crucial for observing how the Enterprise and its crew worked. (TAS: "Bem")
In 2365, Sirna Kolrami boarded the USS Enterprise-D as an official Starfleet observer for the Starfleet battle simulation, titled Operation Lovely Angel, between the Enterprise-D and the USS Hathaway. On this basis, he attempted to assume command of the Enterprise-D when the two starships were imperiled by the Ferengi, but Captain Jean-Luc Picard nullified his order. (TNG: "Peak Performance")
In 2367, Starfleet reached an agreement with the Cardassians that the Enterprise-D would take on a contingent of observers during its mission inside Cardassian space to locate the USS Phoenix. This was done as a show of good faith. The observers included Gul Macet and Glinns Daro and Telle. (TNG: "The Wounded")
While incarcerated in the Federation Penal Settlement in New Zealand, Tom Paris agreed to be brought on board the USS Voyager as a Starfleet observer to locate the Maquis ship Val Jean that had disappeared in the Badlands. He was assured that when it was over, he would be cut loose with a favorable report at his next review. However as the Voyager was stranded in the Delta Quadrant, Paris joined the crew permanently. (VOY: "Caretaker")