Hiding, and how to do it in D&D, is a little more than somewhat complicated in Dungeons and Dragons. Throw in the Shadowdancer and her Hide In Plain Sight ability, and it all gets a lot more than somewhat confusing. Let's start with the basics of Hiding and then move on from there.
Here's a key concept: You need cover or concealment in order to even attempt a Hide check. That means you need some sort of visual distraction, such as the shadows produced by a "Darkness" spell* or the underbrush of leafy terrain or even smoke filling an area. OR you need some object to hide behind, like a barrel or a corner or even another creature (using soft cover).
See the Hide skill, "You need cover or concealment in order to attempt a Hide check."
Not only that, but you STILL cannot hide from a creature that is staring right at you, even if you have cover or concealment. The creature has to be distracted or look away. That's why the Bluff skill has the special application, "Creating a Diversion to Hide -- You can use the Bluff skill to help you hide. A successful Bluff check gives you the momentary diversion you need to attempt a Hide check while people are aware of you."
Now, per the rules, "a shadowdancer can use the Hide skill even while being observed. As long as she is within 10 feet of some sort of shadow, a shadowdancer can hide herself from view in the open without anything to actually hide behind. She cannot, however, hide in her own shadow." That means a shadowdancer does not need cover or concealment, and does not have to worry about creating a diversion.
Moreover, I have to take exception to something Al has been saying. After rereading the Hide description, I do not agree that you have to make a move action of any kind to hide. The Hide rules say "You can move up to one-half your normal speed and hide at no penalty." There is NO requirement of movement implied. You can hide while moving, and you normally do, but again, look at the rules for Hide: "Action -- Usually none. Normally, you make a Hide check as part of movement, so it doesn't take a separate action. However, hiding immediately after a ranged attack (see Sniping, above) is a move action."
Normally you make a Hide check as part of a move. But you do not have to. So can a shadowdancer make a melee attack and then hide? In the same spot? Yes, I say. But per the sniping rules, such a Hide check is at -20.
What about attacking from hiding? Can a shadowdancer attack a foe from hiding, gaining the advantages of attacking while unseen? If sniping, sure, no problem. If you are making melee attacks, then you can attack as unseen only if you first make your Hide check at -20 opposed by your target's Spot check. Per the Hide rules: "It's practically impossible (-20 penalty) to hide while attacking, running or charging."
For a non-shadowdancer, say you are attacking a person in a Darkness spell. The Darkness spell ensures that you remain concealed fur the entirety of the attack. You have to start the round without the target being aware of you -- either you were successfully hiding last round or you have total concealment or some such. You can move AND attack your target, but first you have to make a new Hide check at -20 vs his Spot check.
For a shadowdancer, you do not have to worry about being observed -- you can hide even under observation. But if you want to gain the advantage of attacking while unseen (that is, if you want to deny your target his dex bonus and make a sneak attack), then you have to make a Hide check at -20 vs the target's Spot. Moreover, I would rule, unless the target is flat-footed (for example, because you attacked first and this is the first round of combat), only your first attack gains the benefit of attacking while unseen. Moreover, the shadowdancer can hide (standing in the same spot as a move-equivalent action OR moving around as part of an actual move action), but again, at -20.
So please do not get all freaked out, my friends, about the shadowdancer's Hide in Plain Sight.
First off, you have to make Hide checks at -20 in order to use it immediately before or after an attack. That's my interpretation, anyway, based on the penalty to a sniper (using the rules for sniping in the PHB) who is hiding after taking a shot at someone. However, this is a bit of a grey area, seeing as the rules actually do not give a penalty to use, or even the time required, to hide in the same round after making an attack.
Second off, the loss of the defender's Dex Bonus only applies to the first attack in a round (unless the foe is flat-footed). And there are a couple other things to be aware of when DMing/playing a shadowdancer.
For example, there are not always shadows to hide behind. A DM would be well within her rights to say that 20 percent of all days are overcast outside, with no shadows suitable for hiding. A DM should remember that there are no shadows on overcast nights -- on clear moonlit nights, I would allow Hiding in Plain Sight; under clear starry nights with no moon ... up to the DM.
If a shadowdancer carries a light source, I would not allow Hiding in Plain Sight, no matter what. If a friend carries a light source, then the shadowdancer has to stay within the area illuminated by the source. If a foe has a light source and shines it directly on the shadowdancer, a DM could rule that that the shadowdancer is revealed.
If you want to attack a shadowdancer who is successfully hiding, then the shadowdancer has a 50% miss chance, I would say. So your best bet is to grapple a shadowdancer: You still suffer the 50% miss chance on the first grab, but after that, I would not allow Hide checks while grappling, and your friends can attack the shadowdancer freely and even deny him his Dex bonus.
I would not allow a shadowdancer to hide from a creature using Blindsense, Blindsight, or Tremorsense.
True Sight also defeats Hide in Plain Sight, but if the shadowdancer has traditional, non-magical concealment or cover (hiding behind a bush, say), then the shadowdancer could well still remain hidden from the True Seer.
From a game balance perspective, it is important to let the shadowdancer use his niftiest signature ability. But it is also important to keep the game balanced. If you as DM are letting your shadowdancer make full attacks and normal hide checks, you are probably doing it wrong. Hide in Plain Sight is not Greater Invisibility.
I think that either requiring a move action to hide in the same round and after an attack is made, or imposing a -20 on such an attempt, regardless of the time it might require, are both valid interpretations to a fairly grey area of the rules.
I will note that neither of these ideas are unreasonable interpretations, and that your best bet is to talk it iver with your game DM. Before it comes up in play, by the way.
*Note that under 3.5, magical "Darkness" is not dark at all. It does not stop vision. Rather, it produces an area of "shadowy illumination" that grants concealment.