The nominal interest rate is the yield to maturity at the time of purchase.
The real rate is the yield to maturity and then subtracting the rate of inflation (or adding the rate of deflation).
Example: you buy an FDIC guaranteed 1-year CD from your local bank. You were attracted to the offer because it was the highest in your community, paying an interest rate of 3%. That 3% is the nominal interest rate. A year later you are reading the paper before going to get your money and the headline article says inflation ran 6.75% over the last 12 months. In this case, your real rate was -3.75% due to inflation.