Stroking a penis in a rapid up and down motion by oneself is masturbating and often leads to ejaculation and orgasm.