Say a vendor has both a community version of their software and a more proprietary one.
How can this be done in licensing terms?
Can code be ported either way?
What are the appropriate practises if any?
Dual-licensing is easily enough done, because licences do not inhere in code; they apply to the conveyance of code, so different conveyances may be done under different terms. Wikipedia has a fairly good entry on it.
Can code be ported either way? As curiousdanii has noted in response to your other, similar question, it depends on the "open source" licence used; in addition, it depends on who owns the copyright.
For movement from free to proprietary code, this is broadly impermissible under "strong copyleft" licences such as the GPL, and permissible under weaker free licences such as BSD.
For movement from proprietary to free code, this is entirely at the whim of the copyright holder, so projects that wish to have a dual-licensed model may well require copyright assignment. As this writer noted,
MySQL had a policy that any code contributed to the project required that the author assign the copyright to to the MySQL corporation. This gave them full control over the application, including the ability to publish it under different licenses.
I'm not sure what "appropriate practices" you might be referring to, so I can't answer the last part of your question.