An endogenous factor in economics is something that is explained or calculated from within the model being studied. This is as opposed to an exogenous factor, which is something that comes from outside the model or thought experiment under examination. Which is which, exogenous or endogenous, depends upon what it is that is being examined and within what economic model.
An Endogenous Price
Take that simple supply and demand curve that we've all seen. If we look just inside this model, assume that the supply and demand curves are static, then we can calculate the price just from what is already in the model: the price is endogenous to the model. This is what we really mean by endogeneity, that we don't have to think outside of our model, outside of what we're already looking at, to be able to explain what is happening. Supply goes up, the price drops and demand rises accordingly, all along our static curve.
An Exogenous Price
Still in our simple supply and demand model, what if there's something that changes the price that isn't already explained within our model? That would be an exogenous change. Again, this is what we really mean by exogeneity; that our change is not explained by what we're already looking at and thinking of. We have to reach outside our model to be able to explain it.
Say the market for gas is in balance, that we've a stable price. Then there's a shortage and supply shrinks. We all know what happens in our simple model: demand for gas falls as the price rises. Our gas market will reach equilibrium again at a higher price and we've no need to reach outside our model to explain either the price change or the reduction in demand. Both are endogenous.
However, we might want to think about why the supply of gas has fallen -- this isn't something explained in our simple model. Perhaps peak oil is finally here; perhaps there's been a natural disaster disrupting supplies. Maybe Saudi Arabia is now at war. None of these changes are things that are already inside the model. They are exogenous, and we have to reach outside the model to explain why supply has changed.
Endogenous Factors Can Vary
It's not just prices, or supply and demand, that can constitute endogenous or exogenous factors in economics. For example, we might have a theory about how economic growth occurs, but we leave out technological change so we can concentrate on other factors such as education or capital formation. In such a model, capital formation and education would be endogenous and technological change exogenous.