Practice man, it's the best way to learn. If the beat is getting ahead of the lyrics, slow it down... If it's dragging behind, speed it up.
If you've got it synced up as best you can and it still isn't perfect, you might have to cut the vocals and position them as two or more pieces rather than one big one.