To simulate how list iteration works internally, let's rewrite your program using integer indices and a while
loop.
lst = ["Mohit", "kumar", "sffsfshfsd"]
pos = 0
while pos < len(lst):
word = lst[pos]
print('lst=%s pos=%d word=%s' % (lst, pos, word))
if len(word) > 5:
lst.insert(0, word)
pos += 1
The following shows what happens when you run this:
lst=['Mohit', 'kumar', 'sffsfshfsd'] pos=0 word=Mohit
lst=['Mohit', 'kumar', 'sffsfshfsd'] pos=1 word=kumar
lst=['Mohit', 'kumar', 'sffsfshfsd'] pos=2 word=sffsfshfsd
lst=['sffsfshfsd', 'Mohit', 'kumar', 'sffsfshfsd'] pos=3 word=sffsfshfsd
lst=['sffsfshfsd', 'sffsfshfsd', 'Mohit', 'kumar', 'sffsfshfsd'] pos=4 word=sffsfshfsd
lst=['sffsfshfsd', 'sffsfshfsd', 'sffsfshfsd', 'Mohit', 'kumar', 'sffsfshfsd'] pos=5 word=sffsfshfsd
lst=['sffsfshfsd', 'sffsfshfsd', 'sffsfshfsd', 'sffsfshfsd', 'Mohit', 'kumar', 'sffsfshfsd'] pos=6 word=sffsfshfsd
lst=['sffsfshfsd', 'sffsfshfsd', 'sffsfshfsd', 'sffsfshfsd', 'sffsfshfsd', 'Mohit', 'kumar', 'sffsfshfsd'] pos=7 word=sffsfshfsd
lst=['sffsfshfsd', 'sffsfshfsd', 'sffsfshfsd', 'sffsfshfsd', 'sffsfshfsd', 'sffsfshfsd', 'Mohit', 'kumar', 'sffsfshfsd'] pos=8 word=sffsfshfsd
lst=['sffsfshfsd', 'sffsfshfsd', 'sffsfshfsd', 'sffsfshfsd', 'sffsfshfsd', 'sffsfshfsd', 'sffsfshfsd', 'Mohit', 'kumar', 'sffsfshfsd'] pos=9 word=sffsfshfsd
...
(This goes on until you run out of either RAM or patience.)
As you can see, you keep shifting the final 'sffsfshfsd'
to the right, so your code keeps looking at it and never stops.
This doesn't happen if you work on a copy since you're no longer modifying the list you're iterating over.
It also wouldn't happen if you were to either adjust the loop index after the insertion:
if len(word) > 5:
lst.insert(0, word)
pos += 1 # account for the extra word
pos += 1
or move the word instead of copying it:
if len(word) > 5:
lst.insert(0, lst.pop(pos)) # don't change len(lst)