ANZAC is the acronym formed from the initial letters of the Australian (and) New Zealand Army Corps
Flag of New Zealand
Flag of Australia
This corps was created early in the first world war (1914–18). In December 1914 the Australian Imperial Force and New Zealand Expeditionary Force stationed in Egypt were placed under the command of Lieutenant General William Birdwood. Initially the term 'Australasian Corps' was suggested but both Kiwis and Australians were reluctant to completely lose their separate identities.
It's not known who actually came up with the term 'ANZAC'. It's probable Sergeant K M Little, a clerk at Birdwood's headquarters, thought of it for use on a rubber stamp, 'ANZAC' being convenient shorthand. Later on the corps used it as their telegraph code word.
The ANZACs first saw action at Gallipoli on 25 April 1915. The small cove where the New Zealand and Australian troops landed was quickly dubbed Anzac Cove. Soon 'Anzac' was being used to describe all New Zealand and Australian soldiers that fought on the Gallipoli Peninsula and eventually it came to mean any New Zealand or Australian soldier.
After Gallipoli there were two ANZAC corps on the Western Front from 1916. During the Sinai–Palestine campaign the combined Australian and New Zealand Mounted Division was more commonly called the ANZAC Mounted Division.
The term continued into other wars. A new ANZAC corps was briefly formed during the campaign in Greece in 1941. During the Vietnam War, New Zealand and Australian infantry companies combined to form the ANZAC Battalion.