Beat matching is essential, but there is something else going on that you also might not be aware of. That is 'Harmonic' mixing. So wtf is that then?
Simply put in means mixing in key. You don't have to know loads of musical theory to know what that is. All songs have a key, and harmonic mixing is mixing two tunes that are in the same or complimentary keys.
If you are still unsure, think about the key as being the musical "centre". In many tunes the first note defines the key, and the rest of the notes are related off from that.
Ok so how does that work then? Well, you may well have already done it a few times and not realised. You know those long and perfect mixes, where the tunes just seem to work so well together? Chances are that they were in key!
How do I work out what key a song is and all that then? Well fear now. Some people can instinctively do it all the time, many of us most of the time, and even some of us some of the time. Some confuse this with 'knowing tunes that work' but it's not as simple as that. Loads of tunes will work well together that are harmonically different. Maybe the intro/outros work particularly well etc... loads of things.
Harmonic mixing however is a little harder to nail just by ear. Especially when dealing with underground dance genres like Dubstep etc!!
There are some solutions available though. Notably our trusty friend, software. Yes clever bods have gone and made software that will scan your tracks and tell you what key they are in, and also there are guides showing you what matches harmonically.
Mixed in Key is a commercial solution, and probably the most well known, find out more here.
There is however also a free solution thanks to Rapid Evolution's Mixshare. I have tried this software myself, and it's really quite good. Scanning tracks can tame a while for large libraries (tho this is true for mixed in key also) but once it's done you can see the key, and bpm for all your tracks.
I quickly tested it by sorting my library by key, then picked random tracks that had the same key. The results were impressive, I felt the mixes were definitely harmonically matched, and had that something extra.
Another positive side effect is that it indirectly makes you try mixes that you might not have considered before anyway (maybe an older tune has the same key as a new one you just bought). This itself adds life back in to some mixes.
The next tool you will need is the guide wheel which will help you see what keys are complimentary, The basic rule is same key, neighbouring key (left or right) or relative minor/major key (inner ring/outer ring).
I'd say check out one of the solutions mentioned above, try a few mixes and see what you think. You don't have to worry about switching to all harmonic etc, but it's definitely another tool for your arsenal that is worth knowing about.