Investigating the structural properties of the compact stars is not possible without knowing the equation of state. The equation of state is obtained from the degrees of freedom of the system and the interaction between its particles. Therefore, the equation of state depends on the models of elementary particle physics and nuclear physics. In this talk, it is explained that what the equation of state is and how it is related to astrophysics.