A while loop is used to repeat an action an indefinite amount of times within a single frame until an additional condition is not meet.
You have to be careful to have a condition that will eventually (not) be met by your actions in the loop or include a stop loop action in your event, otherwise your game will freeze (the loop never finishes).
As blackhornet mentioned, the cases you need to do such a thing should be pretty rare.
For a specific simple example, if I were trying to remove all instances of a particular pattern of values out of an array, but I don't know how many times that pattern occurs ahead of time:
While
(Pattern exists in array)
-> Delete index of pattern in array
(Simplified for convenience)
This event would keep running until all instances of that pattern were deleted.
Almost always the "Repeat x times" and "For x to y" conditions should be sufficient to handle any looping logic necessary. They are also easier to use in terms of not getting stuck in infinite loops.