It's based on the Duckworth-Lewis formula. If you do some searching, you can find it online. It is basically a table that gives hypothetical percentages of scores that would be expected at a certain point of an innings, based on a teams "resources" (i.e. number of wickets and overs left). So, for example, it might be that a team who has batted 15 of 20 overs, but still has 9 wickets left, might have only 60% of a hypothetical final total (if they batted on to the end of their 20th over - which of course they wouldn't have to if they had already won in 15 overs). If the team has only 1 wicket left, however, they may have scored 95% of their hypothetical final total. I use a slightly modified version of the ball-by-ball Duckworth-Lewis table (which gives percentages for every ball of an innings, not just every over) along with an added variable which takes into account the "easiness of the chase" (i.e. if the first team is all out and scores only 10 runs, the team batting second could just hit 2 sixes and win, which would make their hypothetical final total massive. It would be highly unlikely that they would be able to hit a six in every ball until the end of the 20 overs). I use a lookup formula on Excel to consult the Duckworth-Lewis table, and then apply the added "easiness of chase" calculation tot he percentage obtained from the lookup. It took me quite a while to work it out, because I wasn't familiar with cricket scoring at first (at all). So I learned this while adding the results to my site a few years ago, and then decided it would not be possible to do a ranking system due to the perceived complexity (then changed my mind and developed the method into a workable Excel sheet over a few weeks).
It's also necessary to use this calculation in matches cut short by rain, though it can be complicated when there have been multiple interruptions.
For example, a team who scores 250-5 in a full 50 innings would get a score of 250.
A team who scores 250-5 in 40 innings (before rain cut their total short) would thus be expected to have achieved a higher score in a full 50 innings, so would get something like 300 in the adjusted total in my Excel sheet. However, the team batting second would bat knowing that they were only going to get 40 overs (not 50), so would be expected to score at a quicker rate, and their total would have to take this separate fact into account. So, in the real match, their "target" would not be 251, but probably something like 265, even though they would be batting the same number of overs (40). The difference is in how many overs they THOUGHT they were going to bat at the start of the innings.
Also, it's possible that their innings could be interrupted by rain also, and their total overs might be reduced to, say, 35, but this might happen after they have already played 20. This severely complicates the calculation, and in general, I don't bother too much about these details, as data concerning when the match was stopped, how many overs were played at that time, etc. are not always available.