The value of a futures contract is the forward value of the payment, discounted back to today -
$$
V(t,T) = e^{-r(T-t)} \mathbb{E} \left[ S(T) - F | \mathcal{F}_t \right]
$$
and the price of a futures contract is the price $F$ that gives the contract zero present value -
$$
\begin{align}
F & = \mathbb{E}\left[ S(T) | \mathcal{F}_t\right] \\
& = S(t)e^{r(T-t)}
\end{align}
$$
Note that as soon as you have entered a futures contract, the price $F$ is now fixed, which means that in general the futures contract no longer has zero present value (the same is true of a forward contract).
Your margin account at the exchange is credited or debited at the end of every day to take account of your profit/loss on the contract. This is the primary difference between futures and forwards - on a forward contract, you accumulate a non-zero present value on the contract over time, which is all realized at maturity. On a futures contract you realize your profit/loss as you go, and this requires financing (you need to fund your losses, and can invest your gains).