The original sequence is, technically, a function from $\Bbb Z^+$ to $\Bbb R$. Specifically, it’s the function that sends $n\in\Bbb Z^+$ to the term $a_n$ of the sequence; fall that function $a$, so that $a(n)=a_n$. To form the subsequence we have another function, which I’ll call $\varphi$, this time from $\Bbb Z^+$ to $\Bbb Z^+$; $\varphi$ is strictly increasing, and $\varphi(j)=n_j$ for each $j\in\Bbb Z^+$. Technically speaking, $\varphi$ is the sequence $\langle n_1,n_2,n_3,\ldots\rangle$.
In these terms the subsequence $\langle a_{n_1},a_{n_2},a_{n_3},\ldots\rangle$ of $a$ is just a composite function: it’s the composition $a\circ\varphi:\Bbb Z^+\to\Bbb R$, since for each $j\in\Bbb Z^+$ we have
$$(a\circ\varphi)(j)=a\big(\varphi(j)\big)=a(n_j)=a_{n_j}\;.$$
Saying that $j\in\Bbb Z^+$ indexes this subsequence is saying that we’re treating the subsequence as a function from $\Bbb Z^+$ to $\Bbb R$ and identifying each term of the subsequence by the $j\in\Bbb Z^+$ that is sent to it by the function $a\circ\varphi$.
Suppose instead that we let $M=\{n_j:j\in\Bbb Z^+\}$ and define a function $\psi:M\to\Bbb R$ by $\psi(m)=a_m$ for each $m\in M$. Each $m\in M$ is $a_j$ for some $j\in\Bbb Z^+$, so each $\psi(m)$ is one of the terms $a_{n_j}$. If we think of $M$ in its natural order as a set of positive integers, we can see that since $M=\{n_1,n_2,n_3,\ldots\}$, $\psi$ is the same subsequence $\langle a_{n_1},a_{n_2},a_{n_3},\ldots\rangle$ of $a$, but this time indexed directly by the set $M$. That is, this time we’ve the integers in $M$ directly instead of first indexing $M$ by the positive integers.
To take a concrete example, suppose that $n_j=j^2$ for each $j\in\Bbb Z^+$, so that $M=\{j^2:j\in\Bbb Z^+\}$. If we think of the subsequence as $\langle a_1,a_4,a_9,a_{16},\ldots\rangle$, we’re indexing it directly by $M$. If instead we think of it as $\langle a_{1^2},a_{2^2},a_{3^2},a_{4^2},\ldots\rangle$, we’re thinking of it as indexed by $\Bbb Z^+$, via the function $\varphi(j)=j^2$.