The key mechanism has three parts - the black top key cover (with the letter), and then two flat white pieces of plastic which snap together to make a x-shaped hinge. One has a long bar which clips in at the bottom, and the other has two short bars which clip in at the top. If these pieces are present and intact all you need to do is assemble them together.
If not you could go to apple but they would replace the whole keyboard, which is costly if you are out of AppleCare and means your mac is out of action for a few days, but there are lots of sellers on ebay which have individual keys and just the hinge mechanisms.
If you aren't sure if everything is there, upload a picture of the parts you have and I'll tell you if you are missing anything.
Finally, reinstalling the key is quite complex but easy enough if you know what you are doing. Once you are at that stage, let me know and I will give you instructions, or look for a video on YouTube.