If you are using Microsoft Flight Simulator, you can follow the built-in lessons to learn to fly. You can also look on the Web for learning materials, especially at the FAA's Web site, which has complete instructional texts that you can download for free. You can give yourself practically a complete ground school course this way.
A simulator will teach you all of the major concepts of flying, but if you plan to learn to fly real airplanes later, there are a few limitations you should know about. The sim doesn't actually move, for example, which makes a big difference when flying for real. And the visibility in the sim is limited, whereas in real life you have many more windows that give you a much better view outside—important for flying visually. The scenery in the sim is also simplified compared to real life, so you don't see as many details on the ground as the real world contains.
However, using a sim is not detrimental to learning to fly. As long as you realize that some things will be different in real life, using a sim can give you a head start. And of course, if you don't actually plan to fly a real airplane, you can just enjoy the simulator and have fun with it.