Summary:
Improvements can be built only in appropriate locations. (Farms may not be built on ice, for example, and mines can't be built atop cattle resources.) The Worker Action Panel will only display improvements that your civilization has the technology for and that are appropriate for the tile the active worker occupies. Generally, farms and mines can be constructed in any tile that doesn't contain a resource. If the tile does contain a resource, only the appropriate improvement can be constructed.