if u want the AI to simply use the spells of the hero and attack your units with it, then just use the AI editor to modify the skill build of the hero which the AI uses, and the AI is smart enough on it's own to use it to attack you. However, if you need the hero to function like in an RPG (i.e. DotA) with advanced micromanaging like running, ganking and so forth, then you need triggers and stuff which can be quite complicated whether you use JASS or not
go read some trigger tutorials, and basically for an AI trigger it is like this:
for a simple escape mechanism
Event: unit is attacked
Action: Order "triggering unit" to "move to (fountain of healing)"
or to make it flee only when it is low health
event: unit health falls below 200
action: Order "triggering unit" to "move to (fountain of healing)"
And so on