Checking irreducibility I have the polynomial $f(X)=X^{2n}-2X^{n}+1-p$ where $p$ is a prime number and $n\in\mathbb{N}$. I want to check whether it is irreducible or not over $\mathbb{Q}[X]$.

If $2^{2}\nmid1-p$ then $f(X)$ is irreducible by Eisenstein's Criterion. However, I can't make any progress when I consider the polynomial $f(X)=X^{2n}-2X^{n}+4r, r\in\mathbb{Z}$.

Any hints?
You are correct, it is always irreducible.

Your polynomial factors as
$AB$ where $A=X^n-(1+\sqrt{p})$ and $B=X^n-(1-\sqrt{p})$. It will suffice
to show that $A$ (and therefore $B$ also) is irreducible over $K={\mathbb Q}[\sqrt{p}]$.

Thanks to Karpilovsky’s theorem (many thanks to Bill Dubeque for
quoting it here), it will suffice to show the following points :

(1) $c=1+\sqrt{p}$ is not a $m$-th power in $K$, for any $m\geq 2$.

(2) $c$ is not of the form $-4z^4$ with $z\in K$.

Proof of (1) : suppose $1+\sqrt{p}=(x+y\sqrt{p})^m$ with $x,y\in{\mathbb Q}$.
 Then $1-p=d^m$ where $d$ is the rational number $d=x^2-py^2$. So $d$ is a rational root of the monic polynomial $X^m-(1-p)$, so $d$ is an integer. As $1-p&lt;0$, $d$ must be a negative integer and
 $m$ is odd. Then $p=1-d^m$ is divisible by $1-d&gt;0$, so 
 $1-d$ can only be $1$ (clearly impossible) or $p$. So $1-d=p,d=1-p$ and hence
 $(1-p)^{m-1}=1$, which occurs only when $p=2$. 

We then have $1+\sqrt{2}=(x+y\sqrt{2})^m$, $m$ odd and $x^2-2y^2=-1$. Each real
 number has a unique $m$-th real root, so $x+y\sqrt{2}=(1+\sqrt{2})^{\frac{1}{m}}$
 and hence $x-y\sqrt{2}=\frac{x^2-2y^2}{x+y\sqrt{2}}=(1-\sqrt{2})^{\frac{1}{m}}$. Adding
 those two last equalities, one obtains

$$
 x=\frac{(1+\sqrt{2})^{\frac{1}{m}}+(1-\sqrt{2})^{\frac{1}{m}}}{2}
 $$

Then, $r=2x$ is both rational and a sum of two algebraic integers, so it
 must be an integer. Now,

$$
 r=(\sqrt{2}-1)^{\frac{1}{m}}
 \Bigg(\bigg(\frac{\sqrt{2}+1}{\sqrt{2}-1}\bigg)^m-1\Bigg) &gt;0
 $$ 

On the other hand, $\big(\frac{3}{2}\big)^3 &gt; \sqrt{2}+1$ yields
 $(\sqrt{2}+1)^{\frac{1}{m}} \leq \frac{3}{2}$, and
 $\sqrt{2}-1 &gt; \big(\frac{1}{2}\big)^3$ yields $1+(\sqrt{2}-1)^{\frac{1}{m}} \geq
 \frac{3}{2}$. Combining the two, we obtain $r&lt;1$. Finally $r$ is an integer
 strictly between $0$ and $1$, which is impossible.

Proof of (2) :  $1+\sqrt{p}=-4(x+y\sqrt{p})^4$ with $x,y\in{\mathbb Q}$ is clearly impossible as a fourth power cannot be negative.
Well, the polynomial $f(X)$ can be written as $(X^n-1)^2 - p$. If $f(X)$ is reducible then there must exist a X such that :
$$ f(X) = (X^n-1)^2 - p = 0 $$ which means that 
$$(X^n-1)^2 = p$$
It necessary follows that $(X^n-1)^2 ∈ N$ ergo $X^{n}-1$ is a natural number, which implies that $X ∈ N$ ... unfortunately there exists no prime number that is also a square number, otherwise it would have at least 1 more divisor different from itself and 1...so the polynomial $f(X)$ is irreducible for any $X ∈ Q.$