A peacock is called a peacock because it is the male bird. The female, strictly speaking, should be referred to as the peahen. Peacock in common usage has become a generic term to encompass any pheasant-like bird with a long showy tail that can be spread out like a fan.
These birds should, more accurately, be referred to as peafowl.
The term has its roots in the Middle English term pocock, pecok; that is, pea, peacock (coming from the Old English term pawa, pea, meaning peafowl, and from the Latin term pavo, meaning peacock) plus the Middle English term cok, meaning cock.
The term peacock in general refers to a male peafowl. A common but incorrect usage of the term is to refer to a peafowl; that is, either male or female.
It is also often used to describe a vain person; or a dandy. It may also be used as an intransitive verb where it is more of an expression which means strutting about like a peacock. In this sense of the term it is used to mean exhibiting oneself vainly.
The adjective forms of the word peacock are peacockish and peacocky.