In order to understand this, I'd STRONGLY recommend you do the MATLAB Onramp tutorials. Try some examples. Look at what happens! For example:
What happens if we try this?
So we see a logical array a boolean thing, true where the corresponding element of A was less than 10, false where that condition was not true.
And that is no different from what was constructed in the code you show. TRY IT. LOOK AT THE RESULT.