I find the other answer to be not so useful because it omits many of the practicalities of grants management. The reality, as I'm sure you've already found out, is substantially more complicated:
Each grant has money in a variety of accounts (senior personnel salary, fringe, student salary, travel, equipment, etc) that have different rules and between which you can't move money. At the same time, if you have (say) a 3-year grant, it is largely up to you in which year you actually spend the money in a given category (as long as you can credibly explain why you didn't follow the original schedule, and as long as you make progress as promised in the proposal).
For some kinds of grants, you can't even move money within one category from one year to another.
If you have multiple grants, you have to explicitly say which grant you or a student is paid from for any given month -- your grants don't get pooled into one account.
There are restrictions on money: For example, NSF will generally not allow you to pay yourself for more than two months per year from NSF grants (total, over all your NSF grants combined).
So it is complicated. In practice, it is made more complicated because if you have multiple grants, they typically don't run for the same length and the same number of years but one will end before another; in many cases, the budget years for each of these grants will even be different (one from September to August, another from January to December).
As a consequence, I don't actually know anyone who has more than a single, small grant, who would have a reasonable scheme to work the finances out rigorously. Over the past ten years, I've generally had 2-4 grants at any given time and my group has had a budget of $200-400k/year from which to pay myself, students, postdocs, and travel. Although I would like to say that I've figured this out after these years, the reality is that I haven't; yet, my finance people keep telling me that I'm better organized than almost anyone else in the department.
So how do I do it? Every few months, I sit together with my finance people and we talk about what and who needs to be paid, what accounts there are, which of these expire the earliest or have the most restrictions, and then we allocate costs to accounts. If a certain student or piece of equipment could reasonably be paid from different accounts, then I will generally try to allocate that cost to the account that expires first or that has the most restrictions -- because this protects money that I can carry forward the longest for future expenses, or that in some cases can be used more flexibly. Beyond these conversations and keeping a general overview of what moneys you have in my head, I can't say that I really know exactly what I'm doing. The university has a system that allows me to project into the future the current spending rate -- but because costs keep being allocated and re-allocated all the time, or are infrequent costs, I've found that these tools are not overly useful.
I'll end by noting that I've generally found it most difficult if I had only one or two grants at a given time because then you really don't have a lot of flexibility: If you've got a student that needs to be paid, you only have one account where that could come from and that account can't run out before the student is finished, nor should the student finish before the money runs out (because then you have to give money back). In some sense, it therefore becomes easier if you have multiple grants and multiple students. Except, of course, that then you also multiply the level of responsibility you have for others and towards the funding agencies.