I have been trying to research how the gears of the crank mechanism of a car window works, either manual or electric. I want to know why it doesn't fall down from gravity. Can anyone link me to an animation or images that explain why it remains stable?
Wormdrive or friction.
Worm drive is a non-reversible mechanism. This means that turning the input (worm) will turn the output (gear), but when you try to turn the gear, it won't move. This solution is most commonly encountered with powered windows, because worm drive inherently has very high ratio: turning the worm one full rotation will turn the gear only one spur. This is advantageous when you have a small electric motor which usually have high rpm but low torque. Worm gear serves here as both gearing and a lock.
As simple as that. The whole mechanism is merely "stiff" enough to stay where you put it. This solution is most commonly encountered with manually operated windows. There is no worm drive here because contrary to electric motor, human hand turning a crank provides low rpm but relatively high torque, so there is neither need nor room for such high ratio gears. In neglected old cars, when the window mechanism gets worn out and loose, it may reach a state where partially rolled down window will fall all the way after you let the crank go.
The "partially rolled down" is important because without worm gear, an additional feature is required: in the very top position an additional locking mechanism engages. So in that case the weight of the glass pane is supported by the lock. Without the lock it would be always possible to force the window down, as it's possible to do it when it's cracked open.
Every window has what's called a window regulator (here's a representative image):
The window itself attaches to the window track. This keeps it steady and level while moving up and down. As you can see, there are gears at the bottom which connect to a motor (or a crank if a manual), which prevent the whole assembly from going down all at once. This is why it's called a regulator, as it regulates the amount of distance the window can travel. The motor has a limiting switch which only allows it to move so far in one direction.
Many newer vehicles use cables to provide the regulation of the window, but the function is pretty much the same. Here is a representative image for a cable type one:
Mind you, every manufacturer is going to do their own thing and they will all look slightly different, but the function is pretty much the same.
The worm drive in the motors or manual crank mechanism has a defined "input" and "output" shaft; if you try to move the "output" side of the drive, nothing happens. Check out the examples at https://en.wikipedia.org/wiki/Worm_drive, it should be intuitively clear why it cannot be otherwise.