Question: Can someone please explain me elaborately what is the difference between $k[X]$ and $k(X)$ where $k$ is a field?

Answer: 
$k[X]$ is the **ring** of polynomials in $X$, so its elements are of the form $$a\_0 + a\_1X + a\_2X^2 + ... + a\_nX^n$$ with $a\_i \in k$ and $n$ a non-negative integer. The operations are addition and multiplication of polynomials, and addition is inverted by subtraction.

On the other hand, $k(X)$ is the **field** of rational expressions in $X$, so its elements are quotients of elements in $k[X]$. This can be thought of as the field of fractions of $k[X]$, so that multiplication is now invertible.
$k[x]$ are polynomials. This is a ring, and it is easy to check that since $k$ is a field the only invertible elements in $k[x]$ are the constants. On the other hand, $k(x)$ is a field; it consists of all rational function.