An optical module is composed of optoelectronic devices, functional circuits, and optical interfaces. Optoelectronic devices include two parts: transmitting and receiving.
To put it simply, the role of the optical module is photoelectric conversion. The transmitting end converts the electrical signal into an optical signal. After transmitting through the optical fiber, the receiving end converts the optical signal into an electrical signal.