How does ocean cargo insurance work?

What does ocean cargo insurance cover?

What is all Risk coverage?

What is With Average coverage?