Certificate or public key pining is just a "whitelist" of excepted connection certificate information so that you can confirm who you connected to is what you expect to be connected to. Basically it can detect man in the middle situations.
Check out as a good general overview.
The only difference between certificate pinning and public key pinning is what data you are checking against in your whitelist. Since the certificate contains the public key you can think of the certificate being a superset of the data being checked. What you check will determine how strict you want to be to detecting minor certificate "changes".
There are also many ways to implement pinning as outlined in the above link. It's just comes down to what you decide to check against and how you store it in a whitelist. Since you are talking about Android, the link above mentions a Android recommended way so you may like to look into that.
Another implementation you may like to look at is the Mozilla pining implementation which is pinning the public key with a whitelist of sha256 hash of the public key stored in hex form.
Update:
As mentioned by @Robert, certificate pinning should be done in addition to standard certificate chain checking. It should not replace the standard certificate chain checking, specially when pining at the root / intermediate certificate level.
Pinning root or intermediate pining can make it less secure but more resilient to certificate changes. Usage of this type of setup depends on why you are using certificate pinning and if you can update your client whitelist easily or not. These are security trade offs you make based on your specific situation.