A private is a soldier of the lowest rank. Private can also mean not public, or belonging to a certain group of people only. Tom is admitting that he's an ordinary soldier, but he's only letting certain people know. The joke is playing on the word private, which can be found in the word privately.
' ' I ' m just an ordinary soldier , ' ' Tom admitted privately .