First, corporal: 1) The lowest rank for a non-commissioned officer; 2) of the body; 3) a linen cloth placed at the center of the altar onto which the Eucharist is placed. Definitions 2 and 3 come to us from the Latin corpus, the body. (The Eucharist, of course, is considered the body of Christ.) Definition 1, the military rank, has a different etymology: it's linked to caput, the head, and more recently comes from the French caporal. A corporal leads (i.e., is at the head of) a corps (a body of troops).
Thus, corporal punishment, a hot-button topic when I was in school, is punishment inflicted directly to the body, e.g., spanking.
Second, corporeal: 1) Bodily, as opposed to spiritual; 2) able to be perceived by the senses, tangible.
A couple of sources indicate that corporal used to be employed in the second sense of corporeal, but that use is largely obsolete.
Setting aside military rankings, both corporal and corporeal have to do with the body, but there are subtle differences in their usage. Corporal refers to a human body of flesh and bone, as opposed to psychological or emotional. Corporeal is distinguished from spiritual and refers to a body in more abstract terms. It's often used to assign body-ness to something that doesn't usually have a body. Ghosts, shadows, and columns of smoke (especially when controlled by trickster demons) can be described as corporeal, but they certainly aren't corporal because they don't have flesh-and-bone bodies.
There are, of course, gray areas. Images of the human body have been described as both corporal and corporeal. And there is certainly an argument over what to call it when the Greek gods take human form on Earth to meddle in our business -- in one sense they are corporal forms because they are flesh-and-bone human bodies, but in another sense they are corporeal forms because they are they have a physical as opposed to a spiritual presence.
In cases like this, the decision is up to the author. Regardless of which word you choose to use, someone will disagree with you. The best you can hope for is to keep your copy editor happy by choosing one and sticking with it.
So, extending one of my examples, what would corporeal punishment look like?