Connecting synths, sequencers and other gear together requires a shared way of sending performance information - MIDI and CV/Gate are the two main standards, and they work quite differently.

CV/Gate

The older approach, native to classic analog synths: pitch is sent as a continuously variable control voltage (CV) on one cable, and a separate "gate" signal on another cable simply switches on/off to say when a note is held. It's simple, fast (no digital encoding delay) and directly compatible with modular synthesizer gear, but generally limited to one note at a time per pair of cables and has no standardized way to send extra data like velocity or patch changes.

MIDI

A digital protocol from the early 1980s that encodes notes, velocity, pitch bend, control changes and much more as digital messages over a single cable (or USB today). It supports polyphony and rich extra data natively, and is the standard nearly all modern gear, DAWs and controllers use to communicate.

Why both still matter

Many hardware synths, especially those aimed at the modular/Eurorack market, still include CV/Gate for direct integration with modular systems, while also offering MIDI for compatibility with computers and modern controllers - a used synth's connectivity is worth checking against what else you plan to connect it to.