This article discusses net profit margin. For other commonly used margins, see Profit margins
Example: Company A has $100mm in Sales and, after all expenses are accounted for, records a Net Income of $15mm. Then Company A's profit margin is $15mm/$100mm = 15%.
Profit margins can be useful metrics, but typically require some specific circumstances to really have significance. Suppose we have Company A from above (15% profit margins) and Company B (with 20% profit margins). If A and B are in the same industry and, indeed, are competitors, then B may be a more intelligent investment.
If, however, companies A and B are not in the same space, then the differences in profit margins may not be so insightful. Suppose A is in an industry where profit margins are typically less than 10%, and B is in an industry where margins are typically greater than 25%, then A is probably a higher quality candidate.
This shows that A generated even more revenue per dollar of expenses, resulting in a greater profit margin. This could be indicative of many things, including lower costs, higher prices, better management, increasing competitive advantage, etc. Though it's a useful tool, perform due diligence before relying on this metric.