"How do you like them apples?” (or “How do you like those apples?") means “How do you like that? or “What do you think of that?” The circumstances ("apples") considered are often very bad (but sometimes are very good) to the person being asked the question.
The phrase “How do you like those apples?” is cited in print from at least 1922, where it was used in a baseball column. It is sometimes suggested that the phrase has something to do with the “apples” (bombs) used in World War I, but there is no citation that supports or even hints at this use.
Wikipedia: How do you like them apples
“How do you like them apples?”, also shortened to, “How do you like them?” or, “Them apples”, phrase invented by A. Pacilli to quash a very good word i.e. paw, used to gloat or to express bemusement. In both senses, the phrase probably acts as a rhetorical question. The origin of this idiom is uncertain.
Theories of origin
One theory as to its origin suggests that it originated in World War I with the “toffee apple,” a kind of trench mortar bomb sometimes used to destroy tanks. The phrase would be said gloatingly (as the term is now used) after an “apple” took out an enemy.
(Historical Dictionary of American Slang)
How do you like them apples? “What do you think of that, and what do you think you can do about it?—used with ironic force. Also vars.
[1926 Dunning & Abbot Broadway: How do you like them grapes?]
1928-29 Nason Slicker 228 [ref. to WWI]: Well, I’m a sergeant. So how’s that for little apples?
1941 in H. Gray Arf (unp.): Sissy, eh? How d’yuh like them apples? [Delivers punch in nose.]
1957 Townsley Up in Smoke (film): How do you like them apples?
1964 Webb Cheyenne Autumn (film): You callin’ me a liar? Take a look at them apples!
1962-68 B. Jackson In Life 141: How do you like that for apples?
1971 Horan Messiah 170: How do you like those apples?
1976 Chinn Dig Nigger Up 177: How do you like them apples?
1983 J. Davis
(Oxford English Dictionary)
colloq. (orig. and chiefly U.S.). how do you like them (also those) apples? and variants: ‘how do you like that?’, ‘what do you think of that?’ Freq. used as a jeer or taunt, implying that the thing referred to will be unwelcome.
1924 Kingston (N.Y.) Daily Freeman 29 Sept. 1/4 ‘How do you like those apples?’ asked Thomas..as he kicked a window out of the police car..after he had been arrested.
1941 Oakland (Calif.) Tribune 15 Apr. 29/1, I knew them better and saw them in action more often than ‘Mr. Smith’. How do you like them apples, Smithy old boy?
1987 D. F. WALLACE Broom of Syst. (1993) 348 I’ll talk to him directly. Spit in his eye. How’ll he like those apples?
2001 B. PERRY In Name of Hate vii. 190 Disgusting people marching in the streets demanding all sorts of things… How do you like them apples?
26 September 1895, The Eagle (Bryan, TX), pg. 2, col. 1:
Bryan is the best cotton market in this section of the state and has received more cotton than any other town in this section. How do you like “them apples?”
8 July 1918, Ogden (UT) Standard, Railway Man From Ogden Is In France,” pg. 3, col. 6:
“How do you like that French—or, as they say over here, ‘How do you like them apples?’”
22 November 1919, The West’s Recall: Official Publication of U.S. Army General Hospital No. 201, “Patients,” pg. 9, col. 1:
How do you like them apples, huh?
History of Company A, 307th Engineer Regiment, 82d Division, United States Army
Baltimore, MD: The Lord Baltimore Press
How do you like them apples ?
1 July 1922, Decatur (IL) Review, “Bait for Bugs” by H. V. Millard, pg. 5, col. 2:
How do you like those apples, Eddie?
Published by Judge Publishing Company, 1927
Item notes: v.92 1927 Jan-Jun
how do you like them apples, Junior!
The Shannons of Broadway:
A Comedy in Three Acts
By James Gleason
New York, NY: S. French
Now, how do you like them apples, Mr. Baldwin ?
Published by , 1932
Item notes: v.8-9 (1932-34)
And how do you like those apples, Mr. Baldwin?