Lettuce seed comes from lettuce plants. Lettuce plants produce a flowering stem, known as a "bolt", which the plant sends up from the center of the plant when the weather becomes hot. The bolt produces flowers, that once pollinated, dry up and produce seed.
Once a lettuce plant starts to bolt and produce flowers, the leaves are no longer good to eat, as they taste bitter. It is best to select one or two plants to produce seeds, and mark them early in the season.
Lettuce is a self-pollinating species, meaning that it does not require another plant to produce viable seed. However, given close proximity to another plant, it can cross-pollinate. Therefore, if trying to produce seed, it is best to cover the seed heads of different varieties to prevent cross-pollination.