Lettuce plants mature and go to seed very quickly. The stalk you are seeing is the stem on which a flower and subsequently seeds will be produced. There is nothing you can do to stop the process. Cool weather may slow it down, but the plants will eventually produce a flower stalk and go to seed (called bolting), and it happens fastest in hot weather. Many gardeners make successive plantings of lettuce every other week or so. This will provide a continuous supply of young, vigorous lettuce to harvest from early spring through fall. There are varieties that are more bolt-resistant--look for this quality when reading descriptions in seed catalogs.