Plagiarism in the community I am a graduate student thinking about some stuff.
1) If I have an idea for a result but it is not yet complete, is it advisable to mention it to others (especially more experienced people)? Is it possible that he/she will take it, develop it quicker than I do and publish it? How should one behave in these situations?
2) Is there a rule of thumb about when (and how) to mention your ideas to others in the community?
3) How often does it happen that a student's idea is hijacked by a more experienced mathematician?
 A: To be honest, I don't like the question very much, but I will answer it by
plagiarizing, I mean quoting,  Hailong's succinct answer:

"There is a nonzero risk.
  But the rewards ... far outweigh the risk". 

To be more explicit, talking to an expert might save you a great deal of effort and
pain, as in "Look at this paper", or "Try this", or more importantly "Here is a counterexample..." It is possible, and there are some famous examples, to solve a
hard problem without discussing it, but this is an exception, especially for someone
at your stage. 
Anyway, you should discuss the specifics with advisor. Unless that's the person
your worried about. In which case, you should switch advisors, or perhaps professions...
A: In brief, you should talk to your dissertation advisor and/or the chair of your department.  If you have a graduate assembly or similar student resource, you should avail yourself of it.  They will be able to give you answers which apply to your immediate environment; MathOverflow users may not be able to do that.
The people I mention are placed in positions of power and trust.  If they are doing their jobs, they should be able to hold confidences.  Also, at some point you will have to test your idea, and that will usually involve revealing it to someone; if you don't have that someone, what are you going to do?
I have a fair share of paranoia, so I also have some sympathy for your position.  I recommend that, in addition to using your resources at hand, you find someone you can place in a position of trust, so that you not only journal the stuff of which you want to claim priority, but you pick your new friend ( say a grad student in the geology department) and keep her apprised of what is going on. (I have seen this sort of practice when I was in grad school.)  This is if you really think you need a witness later.
Your question number 3 might deserve its own question, but with less volatile wording.  However, I think you will find this community unwilling to say much about anything but the most egregious cases.  (Basically, it depends on who you think deserves more credit: the guy with the idea or the guy who made it work?  Joint papers are the norm for a reason.)
Gerhard "Ask Me About System Design" Paseman, 2011.08.05 
A: The math community is rather small, bad people are known (and there's only few of them),
stories about them circulate.
Just ask around: "Do you think that it's a good idea that I go talk to professor X?"
If professor X happens to be an (one of the very few) unethical mathematician, people will warn you against talking to him/her.
A: My answer is fairly simple, perhaps due to my own ignorance and inexperience, but since you asked:
There is a non-zero risk. But the rewards for talking and sharing with people about math far outweight this risk. 
A more practical advice if you are really worried: I would try to cultivate and develop as many friendships  as I could before starting collaborations. It works in two ways: 1) friends are less likely to steal from you, 2) people who walk with companies  are less likely to be mugged.  
A: A number of things can happen. I have heard stories of each of them.
(1) The senior person may have already solved this problem, but not written the solution down. Either she did not think it valuable, or she was thinking about using the solution for a more broad problem. In this case, she will keep her mouth shut.
(2) The senior person may grab the result. This is unethical, but it has happened. I know of no specific instance; I have only heard stories. In this case, you lose, and the senior person is a fink. Go solve another problem.
(3) The senior person tells you how your solution leads to the solution of a more broad problem, and shares the result. 
(4) The senior person tells you how to use your result to go further, and you complete a broader problem. In this case you thank the senior person.
(5) The senior person is uninterested.
The probabilities of item (2) are small. Sure mathematicians can be unethical. But the unethical behavior requires work on the part of the senior person. 
The best advice that I can give is to speak to your academic advisor before divulging your ideas to others. Your advisor will have a better grasp of the ethical behavior of others, and your advisor will probably know if the senior person has insights that she is willing to share. 
Most of the people whom I encounter in the field tend to be generous with results and in discussions with younger mathematicians. That is one reason that I like working in this area.
A: Ask yourself: do you want to be part of a community, or do you want to do math by yourself in the woods?
There is no wrong answer: doing either is a fine and potentially rewarding lifestyle, but giving up on the community means giving up on both the positives and negatives that it brings, and most answers here make clear that the positives outweigh the negatives.
A: While I know cases of stealing by people who heard the idea, or even unintentional incorporation into their other work (one often does not remember which idea helped her/him to come to certain point), this is possible in an unwanted way ONLY if this passing of idea is individual and in a way secretful. If you tell the idea to LOTS of people, at recordable places as well, then everybody knows it is your idea and you will get credit and be allowed to publish it even if some use the idea in various forms. So making it half-available is the only scenario which can possibly hurt you (though such cases are rare in pure mathematics and somewhat more common in areas with more money like physics, biomedical sciences and so on). There is no better protection from stealing a secret than making it no-secret at all. 
A: I think the risks of a senior mathematician stealing your idea are pretty slight. The most likely scenario is that he or she will see something in the idea that you don't see, which might end up in some profitable joint research. Either that, or they'll be too busy with their own projects. I wouldn't worry too much. Of course, if you want to be the sole originator and you don't want to share the credit with a co-author, then it's a bit more risky to share ideas. 
