What is the context of this? The way you describe it, it looks like a cut and paste homework question, but your posting history suggests not.
The basic drill involves the "read" command. Try this in a terminal:
while true; do read -p "enter word: " word; echo "you entered $word"; if [ $word == stop ]; then break; fi; done
This should give you a pretty good idea of the basic approach.
To write it in a script:
while true; do
read -p "enter word: " myword
echo "you entered $myword"
if [ $myword == stop ]; then