What are the various grounds to appeal a custody case decision?

Is there a stipulation or time limit that is given to make a motion for appeal in the case decision or can an appeal be made at any time?

I am pretty sure it is a difficult process because custody hearings can be so messy.