As long as the grocery store has not refrigerated the mango so cold that they killed the embryo, there is a good chance that the seed is alive.
Don't dry it out. Plant immediately after removing from the fruit, or keep the pit damp until you're ready to plant it.
You can plant the whole pit (lay it on its side and bury), but you'll get faster, more certain germination if you remove the seed from the pit. Along one side of the pit it should be thin, whereas the other side is thick (the seed is between the 2 walls of the pit, there). Take a heavy pair of scissors or a pruning clipper and carefully cut through the thin side of the pit, being careful not to injure the seed. the seed looks like a kidney.
Plant it on its side, covered with maybe 1/2" of soil. Keep it warm and don't allow it to dry out completely during germination. It should send out a root within a week or two, and a top should rise from the soil in the 2nd or 3rd week.
Some mangos are polyembryonic, and in that case, you may get several plants from one seed. This is true of many of the pale, greenish-yellow fruit types, which are also often elongated. The more heart-shaped, brilliant red/orange/purple types, on the other hand, are nearly always monoembryonic and give just one plant per seed.
Once the seed sprouts, give it as much light as possible. Mango trees enjoy full sun in the tropics. It will withstand chilly weather, but no frost. Established mango trees are remarkably tolerant of both drought and flooding, compared to other fruit tree species. Still, a well-drained soil, moderately watered, will give you the best growth.
If the plant is a polyembryonic type, the seedlings may be genetically identical to the fruit from which they came. If a monoembryonic type, each seedling is a new (and usually inferior) variety.
Commercially, mangos are usually grafted. They're not terribly easy to graft. Trees grow to be amazingly large, and small trees usually don't bear well (unless a known dwarf variety), so you may not get much or any fruit from a potted houseplant. Ancient seedling trees may grow to 60-80 feet tall by over 100 feet wide; grafted trees can reach more than 40 feet tall by 50 or more feet wide.