Constipation in children is quite common these days. The best way forward is to ensure that you prevent it rather than treat it. Lots of fibres in diet and consumption of recommended amounts of water will help. When constipated visit your Paediatrician who will prescribe you osmotic laxatives as Movicol which act as stool softeners. Giving enema is only a last ditch "fire fighting" which is best avoided!
Next Steps
Proper fibre in diet.
Fluid intake as per age recommendations.
Help build good toilet habits ( using positive reinforcement techniques)
Use osmotic laxatives when child is constipated and keep using till has soft stools which are neither hard nor runny.
Health Tips
Visit your Paediatrician for a detailed discussion about Constipation in children and ways to tackle it.