We consider equilibrium constrained optimization problems, which have a general formulation that encompasses well-known models such as mathematical programs with equilibrium constraints, bilevel programs, and generalized semi-infinite programming problems. Based on the celebrated KKM lemma, we prove the existence of feasible points for the equilibrium constraints. Moreover, we analyze the topological and analytical structure of the feasible set. Alternative formulations of an equilibrium constrained optimization problem (ECOP) that are suitable for numerical purposes are also given. As an important first step for developing efficient algorithms, we provide a genericity analysis for the feasible set of a particular ECOP, for which all the functions are assumed to be linear.