When working with different non-Boolean types, they convert the left value on a boolean, and depending on the result of this conversion, they will return the original left value or the right one.
OR operator will return the value of its left if this has proved true, and if it was false, then it return the right.
AND operator works similarly, but in reverse. If the value of the left is true, it will return automatically the right one, and if not, the left one.
Another important property is that the right expression only runs when needed, so that although the implementation of the second part had important consequences, if not necessary, it will not be executed. This is called short-circuit evaluation.