A universal keygen works by reverse-engineering these algorithms. Hackers and reverse engineers disassemble the software’s code to find the specific mathematical routine used to validate keys. Once they understand the formula, they create a small program (the keygen) that applies that same formula to generate valid keys on demand.
When a tool claims to be universal, ask yourself: if a team of crackers could truly break every software vendor’s licensing algorithm and compile it into one tiny utility, why would they give it away for free on a forum? They wouldn't. They would either sell it to governments or be arrested immediately.