In it’s simplest form, DJing is playing pieces of recorded music to an audience. Usually a DJ plays songs that go well together, and adapt the style or genre of music to cater to their audience.
As far as basic mobile DJs go (think work party/weddings/school disco), that’s about all there is to it. Though there are of course certain skills and some showmanship required to keep the audience entertained. Have you ever been to a work party where the DJ didn’t play songs that most people know the words to?
Another type of DJing involves mixing multiple songs together in a continuous sequence, just like a club DJ. This requires a lot more practice and musical talent, but the aim is still to make everyone dance!