Forms and Javascript (?)

Hey everyone,
I’m working on some stuff and I wanted to know how to do something that I see a lot and would be nice to use. A lot of websites have forms, and the forms will have a value already in them, such as “Name” or whatever, it doesn’t matter. Anyway, when you click inside that particular form element the text dissapears and you’re able to write your own. I was wondering if anyone knew how to do that, I’m assuming it’s Javascript but I really have no idea.
I tried google searching but I didn’t know what to even search for. Thanks for any help/links or even a name of what that technique is called =)