Another proof:
$$gcd(n+1,n^2+1)=gcd(n+1, n^2+1-n(n+1))=gcd(n+1,1-n)=gcd(n+1,1-n+(1+n))=gcd(n+1,2).$$
If $n$ is even, then $n+1$ is odd. Then $gcd(n+1,2)=1$ (is this clear?), this is:
$gcd(n+1,n^2+1)=1$ so that $n+1,n^2+1$ are relative primes.
If $n$ is odd, then $n+1$ is even, so $gcd(n+1,2)=2$, thus $gcd(n+1,n^2+1)=2$.
Remember that: If $a>0$, then $gcd(a,b)=a \iff a \vert b. $
Then $n+1 \vert n^2+1 \iff gcd(n+1,n^2+1)=n+1,$ then $n+1$ must be equal to $2$, then $n=1$ is the only positive integer that satisfies the property.