First, it is important to mention that this only works with mice that support the PS/2 protocol. Modern mice, for example the wireless ones only support USB and don't "understand" PS/2 any more.
PS/2 is a serial protocol, similar to the UART protocol. But unlike UART, PS/2 is a synchronous protocol, which means that data and clock use different wires.
With this, it is easy to use the Arduino's builtin serial interface to receive the PS/2 data from the mouse. Please watch the video if you want to know more.