This is python typing.
word: str says that the argument word is expected to be of type str (string)
def equalFrequency(self, word: str) -> bool says that function equalFrequency is expected to return a bool (boolean), so we should get a true or false values from the function
Examples:
equalFrequency('hello') ==> Correct
equalFrequency(123) ==> Incorrect
Correct:
class Solution:
    def equalFrequency(self, word: str) -> bool:
        return true
Incorrect:
class Solution:
    def equalFrequency(self, word: str) -> bool:
        return 123