The implementation is actually quite simple. It checks that the function length is more than 4 lines of code AND that you are not Robert Martin. If that's the case, it prints "Your function is too complex".
It determines this by computing the cyclomatic complexity of the function. You can think of the cyclomatic complexity as being the number of distinct paths through a function.
The rich support for quoting / unquoting code in Elixir makes it possible to easily compute metrics like this. The implementation in Credo essentially walks through the code, keeping track of how many "branch" operations are encountered.