The techniques use ASCII codes (to replace characters with letters), changing names of variables by short non-defined names, overcoding such as base64, and so on.
First of all, it is done for software product security. The developer may also pursue commercial goals (competitive protection against tampering or hiding values/logic). The result is a compressed (unused classes, attributes, methods are removed) or optimized (operators are checked and rewritten) software. Obfuscated code is used, for example, on Android and Java (example of an optimizer: R8 for Android; ProGuard for Java and Android).
How it works?
Just paste your code and click on "DeObfuscate".