The core is generally the inner most or central area in a body. In stellar bodies such as stars, the core refers to the inner most region of the star. The same applies to planets and even galaxies. While a core conceptually refer to the middle most or central area, the core may not always be in the central area of the object. There are many reasons why the core might be slightly offset such as the irregular shape of the body or damage to the body deforming it.
The core of stellar bodies is generally the densest portion. This is explained that the internal gravity of the body draws its mass to the center. For example scientists theorize that there is a greater density of stars and planets the closer one is to the center or core of the galaxy. Other good examples of the concept of the core is the center of the earth which is thought to be made out of very dense metals and exists in a state of very high temperature.
The sun’s core is also thought to be significantly denser than its outer region and while the sun’s core is made out of gas the sheer pressure due to compression and gravitational forces. This makes the density of the gases in the sun’s core denser than iron.