To masturbate by hand, working the penis with a steady up-and-down motion.
beat one's meat
To goof off and accomplish nothing useful; to busy oneself with pointless effort.
Some definitions on this page are adapted from Wiktionary, used under CC BY-SA 4.0. Credits.