The rough endoplasmic reticulum (RER), also known as granular endoplasmic reticulum, is an interconnected network of flattened, membrane-enclosed sacs known as cisternae.
It appears bumpy, hence the name, because it's studded with little molecules called ribosomes that assemble proteins out of polypeptide chains and package them up to be used by other organelles or membranes within the cell itself or even exported outside of it.
The ribosomes are not always attached to the cell membrane. During protein synthesis, they connect and disconnect when needed.
The rough endoplasmic reticulum provides quality control for these proteins and further organizes them for shipment out of the factory and to their final destination. In the case of improperly made proteins, the proteins will not move, staying within the endoplasmic reticulum.
When there are too many unfolded proteins in the ER, this can trigger the unfolded protein response (UPR). The process attempts to once again bring balance.