“Fool around” is a slang phrase with both innocent and R-rated meanings.
Most of the time, fool around means to play or have fun. A teacher might ask the students to stop fooling around and making so much noise in the back of the classroom. If you fool around with your car, it means you tinker with the engine. You’re not working very hard. You might get fix something and you might not. It doesn’t matter because you’re just fooling around anyway.
Be careful using this phrase though, because fooling around can also mean making out or being physical and romantic with another person.