The honest answer is that it varies enormously. A tiny, simple browser game might come together in a matter of hours, while a full commercial title can take a large team years to complete.
The scope, the number of people involved, the art and audio, and the level of polish all play a huge role. Small projects can move fast, but ambitious games are a long-term commitment.