In Texas Hold'em, three of a kind (trips/set) beats two pair—always.
The original Spanish answer ("dos pares altos es mejor") is incorrect. Standard poker hand rankings (high to low):
Three of a kind outranks two pair regardless of card ranks. Example: 2-2-2 beats A-A-K-K.