It's all a matter of what you agreed to when you started. You need to work out these details and get everyone to agree to them (preferably signed on paper) so that you all know what you're in for.
But how would you do that, because people will continue to buy it as long as it's available and that would be a pain to manually split it into a percentage. So, is there a way you have to hook it up with the bank so say 50% percent goes to the one person, and $50 percent to the other?
If you sell your games through some payment providers, there can be a split-payment feature that automatically distributes the funds made through selling on that particular site. For example, BMT Micro can do this if you and the person you want to share with both have accounts there. You can set it up so that any time your game is bought through that system, some of the money goes to you and some goes to someone else.
Of course, the more places you're selling your game, the more of a hassle this may be, and not all sales points will have automated tools for it. You may have to make some payments manually, with checks or paypal or money transfer services or whatever you both agree to.
If you plan it out in your contract, you can have an arrangement where you only pay them if you owe them at least (some amount) and monies owed keep rolling over until they hit that point. So if you're only selling a copy or two every month, you don't have to mail a check every month, but just save up that $5 a month until it hits $50 and mail it out then.
Do you pay up front or until after the game has made money(this seems more like a personal choice)?
It's definitely about what you agree to. I prefer to pay people up front because sending out profit-shares all the time is a pain. ANd most artists prefer to be paid up-front, too, even if it means they earn less, because it means that they WILL get paid. Too many indie games promise a share of the profits and the profits never, ever happen.
Actually, how does receiving money from something you're selling online even work?
Depends on who you're selling through. You could set up your site to have people send you money through paypal and then you mail them a link to the game, then it would be obvious how you get the money! That's a lot of manual work though.
There are many other stores/payment providers you can set up with which will automate the process. They receive the money, in whatever format, take a cut of profits because they're doing the overhead, send the game to the customer, and send the money to you. How they send the money to you will depend somewhat on where you live and what services you can use. If you have a US bank account, many stores will happily direct deposit right to your bank.
However, as with the profit share, many stores/providers have rules that they only have to pay you if your money earned reaches a certain threshold, or once a year to clear the books. So again, if you're only earning $5 a month they may not send it to you until it's reached a certain level. You may even choose to intentionally set it higher. (This is often done because if you have a European bank account, there may be a fee charged to wire money to you, and it doesn't do you much good to get a $50 payment if $30 is taken out of it in bank fees!)