These are typically done when the tooth decay has reached the pulp. However, a pulpotomy may also be recommended if your child complains of pain when cold or hot things touch their teeth. This is the leading sign that the caries have reached the root.
After an exam, if the tooth has been too badly decayed then a pulpectomy may be recommended. A pulpectomy is just the extraction of the tooth. This is because the primary tooth will eventually be replaced by the permanent tooth.