In some older homes we find incorrectly installed "grounded" electrical outlets that have the opening for the grounded plug ground connector, but the electrical system has no ground path present. If you are replacing an electrical receptacle on an ungrounded circuit you should use two-slot non-grounded electrical receptacles.
But worse than installing a "grounded-type" electrical receptacle on an electrical circuit where no ground is present, is the dangerous step that a few amateurs take of connecting the receptacle's ground screw to the neutral or white wire in the circuit.
This photos shows an improperly wired electrical circuit that provides a false, or commonly called, a "Bootleg Ground" by making a connection from the neutral wire to the ground screw.
This connection may make it appear that the circuit is "grounded" since a test that connects the hot side of the receptacle to the ground port will show current flowing, but this is incorrect.
Not only does a "Bootleg Ground" electrical receptacle lack an actual safe alternative path to earth through a separate ground path or grounding conductor, but worse, the "ground" connection, by being wired to the neutral side of the circuit, can cause dangerous electrical shock as well as damage to equipment plugged into such an electrical outlet.
A safer repair would be to install new electrical wiring that provided a ground path along with grounded electrical receptacles.
"A simple $7 tester will test this outlet as OK, although it is not and could give you a serious shock.
Here is the definition of a Bootleg Ground from Wikipedia: