Beatmatching is one of the most important parts of mixing. It allows you to make a transition between two records without the two records conflicting.
It is what allows the DJ to switch between songs without having the audience notice.
What you are aiming to do is synchronizing the beats of the current song and the song you are playing so when you make the transition, the two records flow together. To do this, you have to be able to recognize which song has a faster or slower tempo and adjusting the pitch to compensate for the difference. At first it is going to seem impossible to tell which song is going faster. The beats will sound all jumbled and random. However, if you keep practicing, you will eventually find that it will get easier and easier to do this. It's just one of those things that come with time and practice. Start the second record in time with the first record and see which record's beat is faster. Just keep on doing this until it starts to come naturally.
The next step is to adjust the pitch of the record to try and make the tempo the same. You always want to adjust the pitch of only the record playing in your headphones. After you have adjusted the pitch try and match the beats together again so the beats of both records lie on top of each other. You can do this in several ways:
This is the basics of beatmatching. It takes a lot of practice to get good at it, but when you get it, you will take your mixing to a whole new level.