I found this questions here assumes that eigenvalue of $|0001\rangle$ is $-1$. Can someone please explain how does this work for this example? How does it work in general for any state?
An eigenvalue is measured relative to a particular operator/matrix. For example, in the linked question, it was considering the operator $Z\otimes Z\otimes Z\otimes Z$.
Recall that for any operator/matrix $M$, a state $|\psi\rangle$ is an eigenvector with eigenvalue $\lambda$ if and only if it can be written as $$ M|\psi\rangle=\lambda|\psi\rangle. $$ So, in the present case, you simply need to evaluate $$ Z\otimes Z\otimes Z\otimes Z|0001\rangle=(Z|0\rangle)\otimes (Z|0\rangle)\otimes (Z|0\rangle)\otimes (Z|1\rangle). $$ Using the definition of $Z$ that $Z|0\rangle=|0\rangle$ and $Z|1\rangle=-|1\rangle$, you'll find $$ Z\otimes Z\otimes Z\otimes Z|0001\rangle=-|0001\rangle, $$ and hence it is an eigenvector with eigenvalue -1.
Note that without a matrix, you cannot say anything. Even with a matrix, most of the time, a given state will not be an eigenvector. It is a very specific property.
Eigenvalues and eigenstates are properties of operators.
For an operator $A$, its eigenstates are the states $x$ that imply that $Ax=\lambda x$
So all $x$ that imply this for a given $x$ is the eigenstates of $A$, and its eigenvalue is the scalar $\lambda$ that is coming out of $Ax$.
In your case there was some operator, the $x$ was $|0001\rangle$, and $\lambda$ the eigenvalue was $-1.$