When the myelin that insulates nerves gets damaged, the nerves underneath can be hurt as well. This can happen when your body tries to fight off a disease. It can also happen when your immune system attacks healthy cells for some reason. The nerves can get scarred, and that makes it harder for them to deliver messages.
When this happens to the nerves on both sides of part of your spinal cord, it's known as transverse myelitis.