There are many different reasons that you may be experiencing "lag" issues, with many of them relating to things that you may be able to address. To give you an idea of what sort of things may introduce lag into your game that you might be able to address, here is a list:
- Poor or slow internet connection
- Slow CPU in your computer, or one that is inadequate for the current state of the game.
- Memory (RAM) errors on your computer or video card, which can be from damaged memory, corrupt files, etc.
- Slow GPU or not enough graphics memory.
- Slow Hard Drive (note: a 7200 rpm drive should be adequate, but a 5400 rpm drive may cause issues with access speed).
There are also some issues that might be outside of your control, such as:
- Traffic depending on your time of day.
- Server load (how many people are playing at a given time).
- The amount of data being transferred between your computer and another player's.
An additional place to look into, is if you play with a lot of addons, you may experience lag, because many addons query other players to obtain their information. However, even if you use no addons, you may experience lag that is introduced by other players sending queries to your computer for information about your character.
Some additional information that may be helpful is that Blizzard recently made a change to their API which limits the number of queries that can be requested in a given time frame for certain information, so you may have recently experienced a reduction in the amount of lag while you are playing.