(covers information from several alternate timelines)
A generational ship is a space vessel in which, over an extended period of time, the operations of the ship are passed down to the crew's descendants.
In an alternate timeline in which the Enterprise NX-01 was thrown back in time 117 years from 2154, Enterprise became a generational ship, the crew showing their children how to operate and maintain ship's systems, a process which was repeated for the next generation. Eventually, the crew was able to change history by intercepting their counterparts in 2154, and assisting them in making modifications which prevented the time travel event from occurring. (ENT: "E²")
In 2375, the crew of the USS Voyager encountered a Varro generational ship in the Delta Quadrant, which had been in continuous operation for 400 years. Assisting the Varro crew in making repairs, they eventually uncovered an underground movement aboard the generational vessel aimed towards breaking away from the rest of the community and exploring the galaxy. (VOY: "The Disease")