with the mob killn trainer thing well i get on high ground so mobs cant hit me but ive tried pretty much everything ive read on

to use the trainer to kill mobs but i keep d/cing...
what exactly do i press to attack mobs get the experience not get attacked and lvl my skills?