To create a rhythm, first sit at your drum machine, keyboard or software synthesizer and open a deep pulse like bass drum sample, along with a crisp, high-pitched snare crack. These are the foundation. Add on top of it samples of your choosing, for dance music you'll have good use for percussion like shakers or hand claps, long deep bass tones, rhythmic guitar mutes and brief vocal samples. Now it's time to arrange your notes, or rhythmic track.
Remember that dance beats are fundamentally easy, even intuitive. Without this basic stylistic compromise, the beat will not register as danceable. Building a dance song's foundation on a complex beat is an uphill battle for any producer. That is not to say your drum parts cannot have a variety of fills, but they must be easily understood by the audience.
Start with a simple pattern, with snare hits on the 2s and 4s, bass on 1 and 3. Begin experimenting with your other samples. An extra bass drum or high hat hit a half beat before your snare, will seem to push the beat forward, a half-beat after will act as a resolution. Experiment with these dynamics and your dance beat is off to a great start.
The duty of the producers is to provide the basic musical elements with an appropriate context through tones and fluidity. The context that needs to be made relates to the style of the music and themes of the song. The tones are crafted through equalizing consuls in the program or presets like heavy bass, high treble, or strong mids, all of which can convey different emotional meanings. There are other tricks of the trade, like panning, drop outs, phasing and harmonics, which can best be learned with time.