-eq returns different things when applied to different types of values.
1,2,3,4,1 -eq 1 # returns @(1, 1)
So when applied to an array on the left-hand side, it returns all elements from that array that are equal to the right-hand side operand. It works like a filter on arrays (the same applies to other comparison operators like -ne, -gt, etc.)
@('hello', 'world') -eq 'hello world' # returns nothing
Naturally.
When -eq is applied to a single value on the left-hend side, it returns $true or $false depending on whether the right-hand side is equal to it.
Type conversion takes place. For example, if the left-hand side is a string, the right-hand side is converted to a string, too.
Arrays are converted to string by converting all their elements to string and joining them with a single space by default (the character used can be changed by using a different $OFS - see MSDN, Powershell Team Blog).
'hello world' -eq @('hello', 'world') # returns true
Naturally. But:
'hello world' -eq @('hello ', 'world') # returns false, note the space
Use .Equals() to prevent that.
'hello world'.Equals( @('hello', 'world') ) # returns false
(1).Equals("1") # false, too