Why does the kneaded dough form a skin when exposed to air and what are the possible ways to prevent the skin formation?
The skin forms because water evaporates from the surface of the dough. The middle doesn't dry out because the drier dough skin is less porous, and so the rate of moisture loss slows down as the skin forms.

It's perfectly okay to eat it, it's just the same dough but drier. Whether it is pleasant to eat is another matter of course. It won't become unsafe until it's been sitting around long enough for moulds and bacteria to grow on it to significant levels and that's not going to happen in an hour.

You can prevent it by preventing the moisture loss from the surface. You've got some options here. For my bread dough I cover the bowl with cling film, which provides a fairly good moisture seal. Moisture still evaporates from the dough, but reaches equilibrium with the air trapped inside the bowl and so doesn't continue to the point where a skin forms.

If cling film is likely to touch the dough itself, it's going to stick to it, so it or the dough need to be oiled to prevent that.

You could also cover it with a clean damp towel. The water in the towel helps create a moist environment around the dough surface, thus discouraging drying of the dough and the formation of the skin. This method is also commonly seen in bread recipes.