Clothes were soaked in a washtub or sink with hot soapy water, then squeezed and rubbed against the ridged surface of the washboard to force the soap through the cloth to carry away dirt. The ribbed glass of the washboard is held in place with a wooden frame.
Modern washing machines are clearly more convenient and labour efficient, but also require far more resources to manufacture. They are also less environmentally sustainable than using a washboard! That’s unlikely to convince most of us to switch though.