New players love exploring, but when it comes to calling an end to exploration, especially in an abandoned mine, they get lost and end up somewhere completey different, away from home. Besides remembering where you last slept and copying the X, Y and Z values for future editing back to spawn/preferred place, use the following tricks to never get lost:
Explore systematically. If you find a fork in the road, or several forks, take them one at a time. When you reach an end, and mining near it yields nothing, then either mark it or use a common block (like gravel) to seal a path off.
Set breadcrumbs. While mining and exploring, be sure to mine up bits of the floor, using cobblestone or a block unlike the floor as a pointer to the way out; or an ore block to note an intersection, so you have something to identify where you began later. While this will damage your pick more, knowing the way back is more valuable than some tool, especially since the wooden planks in abandoned mines are abundant.
Keep natural landmarks. Scoop up the first source of water that leads to nowhere useful, but leave everything else. Some of the water flowing from walls may prove useful for exploration. Also, if there is lava out of your way, do not go out of your way to put it out -- it emits light, which may be encased in a structure with glass (panes) as natural lighting.
Know the way outside, and know when there is lava. Since beta version 1.8 and the revamped lighting engine, knowing when you are close to ground is easy. Torches emit a bright light that fades into warmer tones. Lava has a brighter radius of light, meaning its brightest point is bigger. If you see light that you did not create, then it is obviously a lava pool. Outside light on the other hand uses cooler tones. When you are close to ground, it does not have the warmth of torch light, taking on a more fluorescent white color near the rock, or at night time, a light shade of blue.