Chosen-plaintext attack
The attacker gets messages of their own choosing encrypted and studies what comes out.
Sounds contrived, happens constantly. Before Midway in 1942 the Americans had the island report a fresh-water shortage in the clear; when Japanese traffic soon noted that target "AF" was short of water, the identification was confirmed. The RAF laid mines in chosen spots purely to provoke German warnings with predictable wording.
In public-key cryptography the model comes built in – the public key lets anyone encrypt. Modern theory therefore demands IND-CPA: two chosen messages must be indistinguishable once encrypted. Deterministic schemes such as ECB and unpadded RSA fail that test, and differential cryptanalysis is built on exactly this model.