The trp operon in E. coli bacteria encodes genes for the biosynthesis of the amino acid tryptophan. It is regulated by the trp repressor protein - when tryptophan levels are low, the repressor does not bind to the operator, allowing transcription of the operon; when tryptophan levels are high, it binds to the operator and blocks transcription, turning the operon off. This allows the bacteria to efficiently control tryptophan production depending on environmental availability.