This expression is casual, best used in relaxed or friendly environments. They were fooling around in the park, laughing and playing tag.
Pro Tip 2/3
Not Wasting Time
Be careful not to imply someone is wasting time, as the phrase can be seen neutrally or negatively based on context. Since they finished their work, they earned some time to fool around.
Pro Tip 3/3
No Serious Activity
Use it when activities lack a serious purpose or goal. After studying, fooling around with a video game can be relaxing.