The price of gold is measured by its weight. Therefore, the price shows how much it costs for one ounce of gold in US dollars. For example, if the gold (XAUUSD) price is $1600.00, it means an ounce of gold is traded at US$1600.00. Similarly, the price of silver is its price per ounce in USD. If the silver (XAGUSD) price is 28.00, it means that an ounce of silver is traded at US$28.00.
If you have bought gold for $1600, you do not have an ounce of gold that you can hold, but you rather have the obligation to buy XAU at US$1600. When you close your position, you sell the XAU and close your exposure. If you sell it for $1605.00, you have made profit of $5 for every ounce (unit) of gold in your contract. The same concept applies to silver trading. If you have bought silver (XAGUSD) for $28.00 and sell at $28.50, you would have made a profit of $0.50 for every ounce of silver in your contract.