It’s a fine-sounding expletive — meaning nonsense or rubbish — but hardly heard on anybody’s lips these days, and rather dated. It feels very English: think of elderly ex-Indian-Army colonels in retirement in Tunbridge Wells exploding in wrath over some supposed mismanagement of the country’s affairs and writing disgusted letters to The Times about it. And most of the citations for it in the Oxford English Dictionary are from British sources.
But, as the OED reminds us, the word is actually American in origin, first turning up there about 1852. The OED is firm in dismissing one often-heard view of its origin, from the Dutch word pappekak for soft faeces. It says firmly “no such word appears to be attested in Dutch” but points to the very similar word poppekak, which appears only in the old set phrase zo fijn als gemalen poppekak, meaning to show excessive religious zeal, but which literally means “as fine as powdered doll shit”. The word was presumably taken to the USA by Dutch settlers; the scatological associations were lost when the word moved into the English-language community.
The first half of the word is the Dutch pop for a doll, which may be related to our term of endearment, poppet; the second half is essentially the same as the old English cack for excrement; the verb form of this word is older than the noun, and has been recorded as far back as the fifteenth century.
Despite some uninformed speculation, there’s no link with the vulgar meaning of cock. Nor is it linked to the sense of cock for rubbish (as in phrases like that’s a load of old cock), as that’s a shortened form of cock and bull story, which comes from a fable concerning a bull and a cockerel.