Let $X$ be a variety over $\mathbb{C}$. Let $D$ be an effective divisor on $X$. I heard there is a natural rational map $X\dashrightarrow Proj (R)$ where $R=\oplus_{n=0}^\infty H^0(X,nD)$.
My question:
How is this map defined?
When is this a birational map?
Is $Proj (R)$ the image of the morphism defined by the linear system $|D|$ as in Hartshorne?
Thank you for the help!!