Cerebral palsy is caused by the abnormal development of the brain and can happen during pregnancy, birth, and early infancy. In many cases, the cause is not clear.