The HELP FILE for hide and invis is pretty good to read first:
=====
HIDE SNEAK VISIBLE
Syntax: hide
Syntax: sneak
Syntax: visible
If you successfully hide, creatures cannot see you unless they are affected
by 'detect hidden'. Player characters can detect you, however.
If you successfully sneak, you can move from place to place without being
noticed by other player characters. If you flee, you will stop sneaking
and will have to 'sneak' again.
In order to either hide or sneak successfully, you will have to practice
the appropriate skill.
Visible (vis) cancels your hiding and sneaking, as well as any invisibility,
effectively making you visible again to all.
=======
Good stuff, but I'll cover a bit more ground here.
Basically, HIDE obscures you from enemies but not other players. HIDE is a skill many jobs receive, but not all (type "slist" to check). Some items can also HIDE you (though they're pretty rare and high-level). HIDE also obscures your actions from other players. For example, while HIDING, you can take a bong out of a bag and the other person in the room will not see the prompt saying, "[player] takes a bong out of an enchanted wander bag." However, if another player or enemy has TRUE SIGHT or DETECT HIDDEN cast on them, they'll be able to see your actions.
INVIS obscures you from other players AND enemies. That is, those enemies & players who do not have TRUE SIGHT or DETECT INVIS cast on them at the moment. INVIS characters can be detected even by people without DETECT INVIS or TRUE SIGHT because their actions will show up with "Someone" instead of their name. So they will see "Someone leaves west." Many jobs scan cast INVIS, and there are also items to make you INVIS.
SNEAK simply makes it so players and enemies can't see you leave or enter a room. So "[player] leaves west" or "[player] arrives from the east" will not show up. SNEAK will let you get by AGGRO enemies -- you can get past them without them attacking you because they don't hear you arrive.
How do I know if I'm hiding?
HIDE does not show up on the "affect" or "score" panes, but you can see if it's set up by either setting it so it shows up in your prompt (type "help prompt") OR by typing "affected by" at any time. "Affected by" is very useful -- it also shows you what abilities you might be automatically bestowed with based on your species.
What is TRUE SIGHT?
TRUE SIGHT is a powerful spell that allows you to see everything possible, hidden and invis. Most high-level people have TRUE SIGHT because of items, but some players, like mages, can also cast it (it takes a lot of mana and doesn't last very long). You cannot be blinded by the BLIND spell or the skill GOUGE with TRUE SIGHT cast on you. Very few enemies in the game have TRUE SIGHT, but it makes them some of the most dangerous in the game -- it's impossible to sneak up on them!
How do I get DETECT HIDDEN and/or DETECT INVIS?
Detect hidden potions are sold in both Valburg and North Tek's potion shops. Detect invis is a spell many jobs can cast, but players can't cast it on other players. Detect hidden is far more useful for seeing secret mobs, however, so don't sweat getting detect invis too much.
Also, remember that getting involved in combat will cancel your INVIS and HIDE. After battle, if you want to stay safe from aggro mobs, you have to cast invis or use hide again. Sneak sticks on even after a battle, though.