Indyref2: Why is the Supreme Court ruling on a Scottish independence referendum and what could happen?

The Supreme Court is set to decide whether a second Scottish independence referendum can take place without Westminster's approval.