Full custody

How do you get full custody of your child(ren)? What determines it?