We are concerned with the following elliptic equation with a general nonlocal integrodifferential operator $${\mathcal {L}}_K$$ $$\begin{aligned} \begin{aligned} \left\{ \begin{array}{ll} -{\mathcal {L}}_Ku=\lambda u+f(x,u), &{}\quad \text {in}\quad \Omega ,\\ u=0, &{} \quad \text {in}\quad {\mathbb {R}}^n{\setminus }\Omega , \end{array}\right. \end{aligned} \end{aligned}$$ where $$\Omega $$ be an open-bounded set of $${\mathbb {R}}^n$$ with continuous boundary, $$\lambda \in {\mathbb {R}}$$ is a real parameter, and f is a nonlinear term with subcritical growth. We show the existence of a ground state and infinitely many pairs of solutions. The proof is based on the method of Nehari manifold for the equation with $$\lambda <\lambda _1$$ , where $$\lambda _1$$ is the first eigenvalue of the nonlocal operator $$-{\mathcal {L}}_K$$ with homogeneous Dirichlet boundary condition, and the method of generalized Nehari manifold for the equation with $$\lambda \ge \lambda _1$$ . As a concrete example, we derive the existence and multiplicity of solutions for the equation driven by fractional Laplacian $$\begin{aligned} \begin{aligned} \left\{ \begin{array}{ll} (-\Delta )^\alpha u=\lambda u+f(x,u),&{}\quad \text {in}\quad \Omega ,\\ u=0, &{}\quad \text {in}\quad {\mathbb {R}}^n{\setminus }\Omega , \end{array}\right. \end{aligned} \end{aligned}$$ where $$0<\alpha <1$$ . The results presented here may be viewed as the extension of some classical results for the Laplacian to nonlocal fractional setting.