Factors of production such as labor land and capital are variable in the long run since firms can choose to increase or decrease investments and production (and even to shut down business).
Although firms also have some freedom to reduce factors of production in the short run this is not true of all factors; a firm may have some flexibility to change how much labor it hires but it may not have such ease at changing how much space it has for production (let’s say it only owns one factory).
Selling a factory is difficult since factories are typically very expensive and matching buyers and sellers depends on several factors (location type of goods produced etc). Likewise building a new factory (or acquiring one) is costly and time-consuming. Therefore space for production is a fixed factor of production in the short run. In the long run however new space for production may be acquired or old space for production may be sold. That is – this factor is now variable. If you think about it this should be true of all factors of production.
The very same logic applies to costs. Some costs are not variable in the short run because firms may have contracts that enforce payment regardless of production (rent for example). In the long run these contracts expire or have greater flexibility of being readjusted. Thus all costs are variable then as well.
Introductory texts on microeconomics that may help you are:
Good luck!