". . . I fail to understand . . ."
is an alternative to "I do not understand." The former could sound a bit snarky if said with a certain tone of voice that communicates "I think your example stinks!" or "I am not convinced your example is related" or "I think you haven't given me a good-enough reason to think your example is related."
When a person says "I can't understand," she more than likely means "I don't understand." Perhaps with further explanation, she'll come to understand. Can't could also indicate (by inference) she is really frustrated, with the voice inside her head saying "I can't do this, I can't do this, I can't do this!" In other words, she feels she cannot do this.
Your second set of examples can be improved, I think, by replacing fail to and can't with the word don't (or do not). Don't can be more neutral than fail, and hence can be more diplomatic and polite. Isn't it better to say
"If you don't complete the form by three o'clock, you'll be given another chance to complete it later"
than
"If you fail to complete the form by three o'clock, you'll be given another chance to complete it later"?
The latter example could sound a bit more judgmental than the former.
Even so, the word don't can imply a threat:
"If you don't clean your room, you're grounded, young man!"
Can't, as someone pointed out above, implies an inability to do something, for whatever reason (e.g., not enough knowledge, not enough time, a physical handicap, or whatever).
In a military context, however, the word fail can be quite appropriate. In that context, diplomacy and politeness are likely of no importance!
"If you fail to carry out this order, soldier, you will suffer the consequences!"
As to your last question, the two expressions are certainly similar, but they can be used quite differently. In the military example above, a soldier could fail to do something for a reason unrelated to inability--perhaps unwillingness. He just doesn't want to do it.
On the other hand, a person who "fails to do something" may fail because she is unable to do it, for whatever reason. Again, that reason could be insufficient training, insufficient skills (which may or may not be improved through practice), or even a basic unwillingness. A sin of commission, they say, is to do the wrong thing, whereas a sin of omission to fail to do the right thing.
It is not unusual for someone to talk herself out of doing something by saying
"I just know I can't do this!"
This self-defeating attitude is more common than you might think. Ask your grandmother, for example,
"Grandma, would you consider getting a computer so that we can email each other?"
To which she says,
"Oh, I just can't deal with computers! What's wrong with the telephone?"