Lets break your code down and see what it is doing:
censor("test test test", "test")# So we've called the function with test as the censor word and "test, test, test" as the text string.
def censor(text, word): # text = "test test test" and word = "test"
text_list = text.split() # text_list is ["test, "test", "test"]
new = "" # new is now an empty string
for x in text_list: # item in text_list (["test","test","test"] assign the item to x (x = "test")
if x == word: # if the word x is the same as the censor word then continue
word = "*"*len(word) # The censor word now equals the length of the censor word but as ***
else: # the above if statement was false
word = word # the censor word stays as being the censor word
new = " ".join(text_list) # new now equals each item in text_list with a space put bewteen them, in one string. "test, test, test. Nothing has been done to text_list at this point.
return new # return new, which is "test test test"
Look at what your code is doing, you should notice a few things you didn't intend. Fix them and then see if you have more issues you need help with.