1. Know when you actually need one. A portable file is for moving or sending a copy of your company file, to an accountant, to another office, to yourself on a different computer. It's not a substitute for a real backup (that's a separate .QBB file) and it's not something you work inside directly.
2. Create it. With the company file open in single-user mode as an admin, go to File > Create Copy, choose Portable Company File, give it a name, pick a location (your desktop is simplest), and save. QuickBooks compresses everything into a single .QBM file.
3. Send or move it. Because it's compressed and stripped of the transaction log, a .QBM is almost always small enough to email as an attachment or move on a USB drive, something a full .QBW often isn't.
4. Restore it on the receiving end. Go to File > Open or Restore Company, choose Restore a portable file, select the .QBM, and pick where to restore it to. QuickBooks rebuilds it into a working .QBW company file.
5. Treat the restored copy as the live file from there. Once it's restored, work continues in the new .QBW the same as any other company file; the .QBM itself was only ever the transport format, not a file you edit.