fool around
Also, . Engage in idle or casual activity, putter. For example, Jim loved to fool around with his computer, or She was monkeying around with some figures in hopes of balancing the budget. [Second half of 1800s]
Engage in frivolous activity, waste time. For example, Instead of studying, he spends all his spare time fooling around. Also see fool away.
Engage in flirting or casual sexual acts; also, engage in adultery. For example, He caught the two teenagers fooling around in the basement. [1830s]