In a nutshell
A functional dependency is a rule saying one set of columns fixes the value of another: if you know X, you know Y. Starting from some columns and repeatedly applying every rule whose left side you already have gives the closure — the full list of columns those starting columns determine. If that closure grows to cover every column, the starting set can identify any row, so it's a key. Computing the closure is exactly how you test that.