'yaru' has 2 ways to use.
1. to do
ex. テニスをやる = do tennis ( play tennis )
2. to give
ex. 水をやる = give water
The difference between 'yaru' and 'ageru' is....
ageru : (normal)
give something to someone.
yaru :
give something to your friends, or your pet animals, or plant.