Basically, preloading abilities is a technique used to avoid the first-cast lag problem.
What you need to do:
1. Create a dummy unit anywhere on the map (make sure to clean the location leak, etc)
2. Add the ability (that causes the first-cast lag) to the dummy
3. Remove the dummy
As simple as that.
And remember, if you have a spell that spawns dummy unit, and that unit casts spell(s) too, preload the dummy's abilities too.
It's basically anything associated with the spell should be preloaded.
You can either choose to do this in Map Initialization OR Time Elapsed (or when Player chooses the Hero).
Map Initialization
This will increase the loading time of the game (Loading Screen)
Time Elapsed
You will notice a slight lag/spike early in the game
Player Chooses Hero
If your map is Hero Arena-based map, you should do this, because, it would be crazy to preload all 100++ heroes in your map, that would eat your memory so fast and the lag is tremendous.
So, only preload abilities that the Player Chooses - such as in DotA.
Have you ever noticed that when you pick a Hero, we will get a slight lag ?
Yes, that's the preloading occurs for that Heroes with all his spells being preloaded to the dummy.