You add a WireGuard interface, configure it with your private key and your peers' public keys, and then you send packets across it.
WireGuard securely encapsulates IP packets over UDP. If you intend to implement WireGuard for a new platform, please read the cross-platform notes. If you're interested in the internal inner workings, you might be interested in the brief summary of the protocol, or go more in depth by reading the technical whitepaper, which goes into more detail on the protocol, cryptography, and fundamentals. You then may progress to installation and reading the quickstart instructions on how to use it. If you'd like a general conceptual overview of what WireGuard is about, read onward here.
WireGuard is the result of a lengthy and thoroughly considered academic process, resulting in the technical whitepaper, an academic research paper which clearly defines the protocol and the intense considerations that went into each decision.