You need to firstly plan what wave style you want. A typical one would be a sort of wave interpreter where you have a itterative timer system that moves through a list of waves spawning units based on data for that wave. Less typical ones might use buffs to improve a smaller pool of spawns to be stronger at higher waves.
Generally the attacking of hero units is not so much a problem. You just order them to attack the point under the hero and they will automatically attach anything they come across. If they are to only attack the hero then you order them to attack the hero directly. If they are ordered to attack a point and the hero continiously moves, then simply reissue the attack order every so often.
In any case, you will likly want to use an itteratice event (one which fires perodically) to spawn the waves. For efficiency it is best to avoid hard coded waves (where type constants are used directly with function calls) and instead use an array system where the waves advance the array referenced.