When lactose is absent the lac operon is switched off. This is becasue a repressor protein is produced which binds to the operator region. This prevetns RNA polymerase from binding to the operon and therefore prevents transcription of the structual genes. However, when lactose is present it is converted into allolactose which binds to the repressor protein. This changes the shape of the repressor protein meaning it can no longer bind to the operator region and prevent transcription. This allows RNA polymerase to bind and transcribe the 3 structual genes for beta-galactosidase, beta-galactosidase permease and beta-galactosidase transacetylase.