A bond, a bill, or a deposit quotes a nominal yield in currency. If prices rise while the instrument is held, part or all of that yield is absorbed by inflation. The remainder is the real yield. It can be negative: the holder receives more currency and can still buy less.
The Fisher relation is the usual approximation. It is an approximation, not an identity that markets are obliged to obey.
i is the inflation rate over the same period as the nominal yield. Using a past inflation rate and using an expected one answer different questions.
See discounted cash flow and M2.