This highly depends on the jurisdiction. In some places, simply by giving someone direction to perform work, they are legally an employee and you become obligated to pay for the work that you directed them to do, and the work that is produced becomes entirely your property, all without a contract or written agreement!
That depends on the license the individual pays for. For something to be a work for hire there has to be a contract in place, without that the seller retains the copyright and the buyer gets what he pays for. (Normally one buys a license to use, modify, copy and distribute the work and derivates of the work), If there is neither a contract nor a license then the buyer gets one copy (Just as if he had bought a music CD at the store) and the normal copyright restrictions apply.
In some jurisdictions, this goes further any any "related work" that the 'employee' does (even when not at the workplace or during work hours) also becomes the property of the employer (e.g. making a mobile game as a hobby while working at a studio -- the studio owns your hobby project).
There's a big difference between the letter of the law and what goes on in the real world though -- it's possible for an unorganised group of hobbyists to form into a real legally bound company with unanimous agreement, and it's also possible for a completely by-the-book employment situation to end up in lawsuits.
For example, my current employer routinely violates federal employment laws with potential fines as high as $30K per instance, but the employees accept this practice. Even though they're not operating by-the-book and have the potential to devolve into lawsuits at any time, they still exist as a successful company.
As always, business questions need to be answered by a lawyer (and IANAL).