Recursion occurs when same code is executed again and again. you can avoid it by using Static Boolean variable.
To avoid the recursion on trigger make sure your trigger is getting executed only one time.
Example : you have to create a class with a static boolean variable with default value true and once you check make the variable false.
Public class check{
private static boolean run = true;
public static boolean runOnce(){
if(run){
run = false;
return true;
}
else{
return run; }
} }