The idea is the same as with other similar operators (+=, *=, etc):
a ||= b is a = a || b
And this trick is not limited to Ruby only: it goes through many languages with C roots.
edit to repel downvoters.
See one of Jörg's links for more accurate approximation, for example this one.
This is exactly why I don't like Ruby: nothing's ever what it seems.