It depends what you are doing. If you have a sprite moving and want to stop when it touches (for example) another sprite add a Sensing test to your loop...
Repeat Until Touching Sprite 2?
Move 10 steps
if on edge, bounce
Or you could test to see if it is touching a certain colour.
Or you could use a Broadcast instruction when something happens that tells an individual sprite to stop moving.
Offline
Sprites don't move unless you tell them to, so its not really
"Tell the sprite to stop moving"
rather
"Stop telling the sprite to move"
How to stop it will depend on how you are telling it to move, of course. Easiest thing is probably to put an "if" statement of some sort just before the movement instruction that checks to make sure its stopping condition (touching another sprite, for example) has not been met - and if it has, don't proceed to the movement instruction.
Offline
You can stop something that's happening over and over because of a "forever" block by putting a "stop script" inside of an "if" inside of the "forever"-- it'll go "forever" until the condition of the if is met, then hit the stop script & stop.
For instance try this script (starting from a blank project with just the cat):
when greenflag clicked
forever
move 10 steps
if on edge, bounce
if (( distance to mouse-pointer ) < 20)
stop script
The cat then moves back and forth forever, but stops when the mouse pointer gets close enough.
<3
Offline