How will the Bitcoin wallet calculate the address?

I've heard that the Bitcoin wallet calculates the address based on the public key, but I want to know how it's calculated. After the calculation will know that the address is superfluous.