What you just described is called breath holding spell and it is usually seen in children who might be absolutely normal but they should be screened for the below given medical conditions.
1.anemia-deficiency of blood.
2.any problem in heart or lungs
3.growth issues.
4.brain problems.
Usually 90 % of children with breath holding spells if given iron supplements their episodes will stop
Next Steps
you can stop this by taking child in your lap.and keeping the child's knees bent touching the chest.this is called knee chest position and it works every time.
Health Tips
do not panic
let the child be seen by a Peds.
start iron