The CountA() function counts how many cells in the range have text. If that result is 2, then it performs the concatenation. If the result is not 2, it concatenates the cells without delimiter. This will return a blank cell if both cells are blank, and if only one cell has a value, it will return that value.
I prefer the & operator to concatenate text. It's far less typing.