I'm going to move you to our Music & Sound forum for this one, as although this
is a business question I feel you'll get better/more detailed responses to your questions from actual composers.
That said, I've worked with a number of composers and they generally followed pretty much the same methods, so I'll provide my own answers to your questions based on that experience:
1. Pay up-front or profit share/royalties?
Composers will almost universally prefer an up-front payment rather than a profit-share/royalty based agreement for the simple reason that they are then guaranteed to actually earn something for their work. Creating music requires potentially very expensive equipment and software and takes a lot of time and skill, so working for the
chance of a percentage payment
if the project is successful will rarely be appealing unless you're an experienced developer with an almost guaranteed chance of earnings -- even then an upfront payment
supplemented by royalties would normally be preferred.
2. What's a fair amount for an up-front payment?
Most composers will charge you a fixed amount per minute of music, although in some cases they may be open to a fixed payment per-piece instead -- how much they will charge varies massively, anywhere from $20 or to hundreds of dollars per minute of music -- in general you really do get what you pay for, and the more skilled and experienced composers (who will likely also be using more expensive equipment, software and sample libraries) will normally produce much higher quality music for the extra money. Almost all composers are willing to negotiate on price.
3. Do you get to own the music/rights?
As Tom says, this is normally done as a work-for-hire, in which case you would indeed be transferred the rights to the piece; many musicians will want or appreciate permission to use the completed works in their portfolio/demo reel. You may in some cases be able to get a cheaper deal for non-exclusive rights to the work, but obviously that implies the work may be used again elsewhere without your input.
4. How long does it take to produce music?
This one is really impossible to give a general answer for, as it depends on a large number of factors including the composer in question, the length and complexity of the music, how many pieces you need, etc. If you have more time available and your project catches the interest of a composer you may be able to get a cheaper deal in exchange for your music being made in-spare time rather than as a priority. Conversely, you may be able to get your music produced faster (within certain limits of course) if you're willing to pay more money to have a composer give your project their full attention.
Most composers will be happy to give you an estimate of how long producing a particular piece would take (as well as how much it would cost) if you're able to give them a decent description of what you're after -- providing links to or recordings of legally available samples of similar styles of music can be a helpful way to communicate exactly what you want.
5. Can I buy a song that has already been written?
Yes, assuming of course the song isn't already under some sort of agreement preventing licencing it to you, and assuming a musician (or whoever currently owns the appropriate rights to the music) is willing to negotiate a suitable deal with you. In this case you would need to talk to the composer, musician or record label in question and would probably also need to seek legal advice.
It's worth mentioning that there are also services such as
AudioJungle where you can browse and purchase from libraries of pre-written or stock music and sound effects. In most cases you would be getting non-exclusive rights to the music, meaning the same music could be used in any other product as well as your own. The advantage of course is that you would not have to wait for or negotiate with a composer -- you simply pay the stated up-front cost and can immediately use the music in any way that the licencing terms allow. The disadvantages are that you may not be able to find exactly what you're looking for, and that you will almost certainly not have exclusive rights to the pieces.
Hope that helps!