Definition of masturbating:
(v) :
(intransitive) 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.
(v) :
(transitive, colloquial) To stimulate someone else sexually without penetration of the penis.
(v) :
(informal, derogatory) 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.