To tackle this problem, you need to understand what it is that causes rice to clump together. I will explain it later.
When cooking rice, I use basmati rice. It is important to know which rice you are using as some rice grains, such as a risotto rice are more starchy, in part due to their high surface area. For basmati I use 150g (or ml) water to every 100g of rice - do not use cups but use weight instead. Measure it out, and rinse off the excess rice flour using cold water. I add spices, and I add couple of tablespoons of butter for about 200g rice. The butter melts into the water. I use a saucepan with a glass top that allows me to see how it's getting along. If i see it bubbling up, i turn down the heat, it risks boiling over i take it off the hob and hold it above until it cools down a bit then replace it. When enough of the water is gone (about 8-10 minutes or so), i tilt the pan and see through the glass lid if the rice is done. If there is still water in the pan, then the rice is not done. If you see the rice slide, it's not yet done. Cooked rice wont slide. Heat it up on a very low simer temperature and wait for it to be firm. The minute it is firm, the heating stage is complete. Take it off the hob immediately. Now you move onto the cooling phase.
It is important not to lift the lid during this process - which is why i recommend a glass lid, so you can see it. To clarify this is the correct amount of water to use. When the rice has boiled off, a lot of it will still be steam. You should not lift the top off the pan during this cooling process because the steam needs to continue cooking the rice. If you raise the lid, too much moisture will escape and the rice wont be cooked through.
Now when it's cooked, take it off the heat, and leave it to start cooling, after 10-15 minutes while the rice is still warm, run a fork edgeways through the rice so that you don't break any grains. When the grains break it releases starch and this causes more clumping together. Because of the butter you melted in earlier, running the fork through it is easy. Separate all the rice now.
When the rice cools, contrary to expectation, the butter will keep the grains separate. Essentially when the rice cools, the starch crystalises, causing grains of rice to cling together via a sticky starchy glue. The butter doesn't stop the starch from becoming sticky, but it does cause a barrier that stops this starch "glue" from connecting between grains.
Some people recommend straining rice first before cooking. I don't always do this unless I am at the end of a 5-10kg bag of rice, when there's a lot of starch down there. However I should. All the stickiness is caused by the starch around the rice grains. The less starch the less it will stick, but a lipid like barrier is best.
Apparently olive oil can be used too. However i get better results with butter.
The same strategy can be used for other starchy foods like pasta and potatoes.
Stickiness can also occur in rice because the ratio of water to rice is wrong, remember it's 150g of water to 100g of rice.
New update to this: using a pan that is too large means the steam is too thin and doesn't steam the rice properly. For 2 cups of rice, i find a 20cm saucepan is fine. Saucepans bigger than this cause me issues.