I understand that they arise due to the pairing of bases of two opposite stands and are sites through which important proteins needed for replication and transcription of DNA interact. But I don't get how the arrangement of bases really generate the grooves.
First the MAJOR groove. This can be considered by forgetting that the two DNA strands are separate and thinking of them as merged together like a rope or an electric cable in my diagram below. The cable is wrapped around an axis, which can be thought of as an imaginary rod. One could wrap the cable tightly round the axis so it was always in contact with itself and no space in between (as on the extreme left), or one can wrap it round less tightly with space in between (subsequent images). The latter is what happens and the space left by the wrapping of the rope is the major groove (because it's wider than the minor groove we come to next).
So to your question, what causes this winding to be the way it is — which is to say what causes the particular pitch of the DNA helix? This is presumably the most thermodynamically stable conformation, maximizing the strength of the hydrogen bonding between the bases (most linear, not too close or too distant) and minimizes steric and electric replusion (the phosphate backbone is negatively charged).
Next the MINOR groove. We now have to consider that our 'cable' is actually two strands of DNA — a sugar phosphate backbone with the paired bases in the centre. Although the bases are in the centre, the space between the two sugar-phosphate strands is not completely occupied. This creates another groove - the minor groove - less wide and of quite different origin to the major groove, but still able to accomodate certain small proteins. As it happens, this is the case with the electric cable analogy illustrated. The cable is two electric wires, but they are encased in the same plastic inuslator.
So to your question, what causes the minor groove? This is just the three dimensional shape of the DNA double-strand which reflects the molecules that make it up. The large phosphate groups can be considered like wide tubes at either side, whereas the bases between the strands are flat and so lead to a groove, irrespective of whether it is wound into a helix or (in one's imagination) stretched out.
(The 'major' groove is exaggerated in size compared to the 'minor' groove in the cable analogy, but I hope it illustrates the difference between the two.)