len(word) is the number of letters in word
len(word)-1 is the index of the last letter in word. Python indexing starts with 0.
word[len(word)-1] is the last letter in word.
x = '' sets x to an empty string
x += 'a' is the same as x = x + 'a'
Adding two strings makes a new string that is the two strings concatenated. if x == 'b', x += 'a' is the same as x = 'b' + 'a' or x = 'ba'
x += word[len(word)-1] gets the last letter in word and adds it to the end of whatever is in 'x'.
This program loops through the letters in word starting at the end. Ig adds the letters to x. In the end, x has the same letters as word, but in reverse order.