Docks have a red, yellow and green light that are used for different things.
If a dock is showing a red light, it means that the bike is broken and cannot be unlocked. If there is no light showing, you can unlock the bike using a key or ride code. When you insert your key or type in your ride code, a yellow light will show temporarily, and then will switch to green when the bike is unlocked. If the light switches to red instead, try your key or ride code again. If the light continues showing red, try a different dock.
When you return a bike to an open dock, the yellow light will show temporarily and then will switch to green when your bike is locked. If the light switches to red instead, try pulling the bike out and docking it again. If you continue to get a red light, try a different dock instead. Always be sure to wait for a green light to make sure that your bike is locked and your ride is ended.