Stalactites are primarily formed in caves due to the specific conditions present, such as the presence of a ceiling and dripping water. However, in rare instances, stalactite-like formations can be found in other environments, such as abandoned mines or underground tunnels.