This is called hexadactyly. The word hexadactyly literally means six digits. In medical usage, hexadactyly does not specify whether the six digits are fingers or toes (although in Greek "dactylos" is without equivocation a finger).
The 6th digit can be located in three different locations: on either side of the extremity or somewhere in between. With the hand for example, the extra finger can be out beyond the little finger (which is called ulnar hexadactyly) or out beyond the thumb (radial hexadactyly) or, finally, between two of the normally expected fingers (intercalary hexadactyly).
Far and away the most frequent form of hexadactyly is ulnar (postaxial) hexadactyly. Next comes radial (preaxial) hexadactyly. And far and away the rarest form of hexadactyly is intercalary hexadactyly.
Hexadactyly in itself can be innocuous, absolutely harmless and very easily remedied, when the hexadactyly is an isolated finding and the baby is otherwise entirely normal. Ulnar hexadactyly with just a rudimentary tag of a sixth digit, for instance, can be very simply treated by tying it off with one suture.
Hexadactyly can be seen on some prenatal ultrasound scans. The differential diagnostic list of disorders causing hexadactyly includes a number of conditions including Pallister-Hall syndrome and Greig syndrome
Hexadactyly is the most frequent form of polydactyly, a diagnosis that encompasses all cases of extra digits, irrespective of the number of extra digits in a particular case. See also six fingers or toes.