Hemingway's ''A Farewell to Arms'' was written to quite an extent about Hemingway's own experiences as a soldier in Italy during World War 1 (1914-1918).
In it, he basically makes a condemnation of war, which he believes to be a terrible and sordid thing, not a 'heroic' business as most people think, or want us to believe-- and Hemingway depicts how terrrible and sordid war really is, and how it destroys people and societies and countries.
He also shows/believes that Love is the 'antidote' to war, and in this story he depicts the love story between Lt Frederic Henry the protagonist (based partly on Hemingway himself) and Catherine Barkley a nurse (based partly on the real life Agnes von Kurowsky), both of whom 'escape' or try to escape the war and find mutual love and happiness.
However, in Hemingway's philosophy or code of life, such happiness doesn't/can't last-- sooner or later, life will 'destroy' us and our hopes. Thus, in AFtA , even Frederic Henry and Catherine can't find happiness or permanence to their love, as Catherine dies while delivering their baby.
It's a very honest and sincere book, and a well written, moving account of love and war in modern times. I hope the link below will help you to get a broader picture. Good luck.