[EDITED TO ADD an important note: This method works for white rice only. I'm sure the general method works for brown rice too, but the cooking time would be different, and quite possibly the quantity of water too. Since I don't cook brown rice myself, I'm afraid I can't help with that.] [In my defence, I plead that Asians don't eat brown rice either, as an almost universal rule. I know nutritionally it's a lot better, but I get my fibre and vitamins and stuff from other whole grains, and I really don't like the taste of brown rice much, especially compared with white which is one of my favourite foods ever.]
Because a friend who is on LJ told me recently that they always have trouble cooking rice, here is my simple, totally foolproof method for cooking rice the Asian way (steam-cooked, rather than boiled in plenty water the Italian way). My claim to authority is simply that I make rice several times a week, and it works :-) (A rice cooker would probably also work. I don't have space for one. No, really, I mean it.) It's very simple and requires almost no attention or work once the water boils (just a timer). If it looks complicated, it's just because I'm long-winded.
It works particularly well for Basmati, which is a wonderful rice, but not terribly forgiving. It can be used for any other Asian medium- or long-grained rice, like for example Thai Jasmine (it should work for short-grain and glutinous as well, but I don't have much experience with it so I won't guarantee).
With Basmati, the first trick is to soak the rice in cold water for about an hour before cooking. It's not strictly necessary, but I find that it makes it even easier to get a perfect result.
With any rice, including Basmati, the second important thing is to wash the rice before cooking (and after soaking, if you're doing that). This gets rid of the loose starch, as well as any dirt there may be. It can be done in a colander, but I prefer the traditional way where you put it in the pan, add water, swirl it around, pour out the water and repeat until the water remains clear. It's really quite easy to do, and no, the rice doesn't tend to pour out. Washing the rice is absolutely vital to this method of cooking. (OTOH, it is basically useless if you're cooking it in plenty water, and counterproductive if you're making risotto.)
To cook the rice you need a pot with a fairly tight-fitting lid, and a tea-towel.
Proportion of water to rice is important, but you don't need to be strictly precise -- the foolproof method allows for a bit of leeway. There are two ways to measure. One is to use 3 parts of water to 2 parts of rice (measured by volume, so say 3 cups of water to 2 cups of rice). The second is to put the rice in the pan and add water until it's just over 1 cm over the top of the rice. (With a normal-sized pot, this tends to be pretty much the same amount.)
If you want to add salt, do it at this point. In Asia they don't, as a rule; I generally do because I'm Italian :-), but use little salt when I'm cooking Asian.
Bring the water and rice to the boil uncovered. When it reaches a cheerful boil, stir it a bit, then take the pot off the ring, cover it with the tea-towel and then put the lid on (well ok, it's easier to wrap the lid in the towel and fit it and the towel on the pot together). The tea-towel seals the lid keeping all the steam inside. (Traditionally in India the pot is sealed with bread dough. If you have bread dough lying around, feel free to use that instead of the towel...). I suggest that you fold the corners of the towel on top of the lid -- this is especially important if you have a gas cooker and want to avoid rice flambé (well, actually the towel gets thoroughly soaked, so it probably wouldn't catch on fire anyway, but you never know). Put back to cook on the lowest heat you can get from your cooker, and cook for 10 minutes without removing the lid.
After 10 minutes, take the pot off the heat and leave it sitting for another 10 minutes without removing the lid. Because the lid is sealed, the rice will finish cooking quite gently in the steam. It won't burn, and it won't go soggy.
Open the lid (Watch out for the steam! It's not really under pressure, but it will still all come out when you remove the lid, and since it's off the heat it's easy to forget about that...) and stir the rice gently with a spatula to fluff it up. Ready!