To masturbate by stroking or rubbing one's penis.
To waste time; to engage in an unproductive activity.
To stimulate someone else sexually without penetration of the penis.
To stimulate or please oneself by means of anything, not necessarily sexual, that does not get them anywhere; something that wastes their time; something that does not help others or achieve any important goal.
To stimulate oneself sexually, especially by use of one’s hand or a sex toy made for this purpose, often to the point of ejaculation or orgasm.