Windows makes heavy use of system hardware so while it executes, there is still a lot of work to do in making each aspect of it work. The overall status of Windows is that it can work (to a degree) but this level of compatibility varies version to version.
Making it work
To get Windows before 3.0 to run, you must set the DOS version to a pre 5.0 number. Ex: VER SET 4.0
3.0 does not need this, and will run with DOSBox's default setting of 5.0.