Older house. Imagine someone wired from Panel to A to B to C with un-grounded wire (2-wire).
Later, someone wired from C to D with grounded cable.
When you go to change your sockets in C and D, what do you see? A ground wire. So you hook it up and expect everything to be golden. It's not. That ground goes nowhere useful.
In fact, the ground is worse than useless. If an appliance at D has a ground fault, that will cause the appliance to be energized at line voltage. And its ground will carry it to socket D. And guess what. That carries it to socket C, and every appliance plugged into socket C. Now, all of them are energized at line voltage, the grounds are shocking you! This is the danger of an "island of grounds". The ground is a liability unless it goes all the way back to the panel.
Fortunately it is legal to retrofit grounds as of NEC 2014. You need to run an appropriate sized ground wire either back to the panel, to metal conduit which goes back to the panel, to any other grounded junction box with large enough ground wire back to the panel, or to the copper ground wires from the panel to ground rods/water pipe etc.
If you cannot confirm ground at the outlet, you need to protect the outlet with GFCI, and then apply the sticker "NO EQUIPMENT GROUND" which comes with the GFCI.
Note that a GFCI's "Line" screws accept 2 wires each. Very important. Also note the GFCI has a warning sticker covering something up, which says "Do Not Use. For Wizards Only." or words to that effect. This is for the LOAD feature, which allows that GFCI recep to protect other points-of-use downline. This should never be used! Unless you know exactly what you will be protecting, and doing so makes sense.