A dogsbody, or less commonly dog robber in the Royal Navy, is a junior officer, or more generally someone who does drudge work. A rough American equivalent would be a "gofer," "grunt" or "lackey".
The Royal Navy used dried peas and eggs boiled in a bag (pease pudding) as one of their staple foods circa the early 19th century. Sailors nicknamed this item "dog's body". In the early 20th century, junior officers and midshipmen who performed jobs that more senior officers did not want to do began to be called "dogsbodies". The term became more common in non-naval usage c. 1930, referring to people who were stuck with rough work.
The term dogsbody has not always been derogatory, with a number of people deliberately using it as their callsign or handle. The most famous of these is probably Douglas Bader, who was an RAF fighter pilot during the Second World War.