It depends on the simulator. If it is an FAA certified simulator, any use in the presence of an instructor or inspector may be logged toward required hours. There are limits and almost every FAA rating requires actual hours in a real flying airplane cockpit.