We know by the context. Sometimes it's obvious, e.g. it says New Earth or it is happening now, which means the present or intermediate Heaven. Sometimes it's harder to tell.
For more information on the subject of Heaven, see Randy Alcorn’s book Heaven.