Scheme Relative URLs

Daniel Vassallo, in an answer on Stack Overflow:

//example.com/img.png is a perfectly valid URI syntax as per RFC 3986: Section 4.2. It is relative to the current scheme, and … it can be very useful when switching between http and https, because you won’t need to explicitly specify the scheme.

How is it possible I’ve never learned this?