What causes lag in gaming?

Let's just say that i've lived my life gaming without understanding what specs are? Below are my specs(yes its a mac but i'm plannin to buy a new laptop, presumably windows for gaming). Please tell me what does what and how do i improve a spec. Don't worry about internet connection. I got that ground covered well.

Processor: 2.4 GHz Intel Core 2 Duo
Memory: 8 GB 1333 MHz DDR3
Graphics: NVIDIA GeForce 9400M 256 MB

Interestingly, i play League of Legends in high specs without lag but not low graphic games like minecraft or counter strike source for goodness sake!

Please enlighten me with your knowledge

Well some games require a next level processor like I3 or more ram more graphics it depends from game to game you can check whether you can run those games in this website http://www.systemrequirementslab.com/cyri

as far as lagging is concerned it happens if your game requires more graphics than you have

More ram and better processer and graphic cards should improve it

The most demanding games now need a high end GPU ie graphic processing unit rather than RAM or something. The heart of gaming performance is GPU the GPU you are using is outof date my friend 256MB is not enough and also the type of card is also important. There are two types now GDDR3 or GDDR5. The R3 cards are will produce a single bandwidth and they are mostly 64 bit and the latest R5 card have dual bandwidth with 128bit encryption and there clock speeds are high. As if you said that possessor core 2 duo with two cores can't do that hard to run the games that are coming now.coming to RAM it is good to have more RAM but it does not really matter without a good GPU and CPU