Your question revolves implicitly around the concept of quantum decoherence and how to protect real-world implementations of qubits from it for a long time.
This is an incredibly general problem, and at the same time, the details are wildly dependent on the technology used.
If you have access to it, you can check chapter 5 : "Noise and decoherence" of Theory and Design of Quantum Coherent Structures. Also, for illustration on the current state-of-the-art of different approaches, you can check this Europen project on Engineering electronic quantum coherence and correlations in hybrid nanostructures, or this other European project (disclaimer: this is my own approach) on A Chemical Approach to Molecular Spin Qubits.
Since the problem of storage of quantum information is vital, some general strategies have been developed. In a nutshell:
Quantum Error Correction (also, for a slightly outdated pedagogical review see Quantum Error Correction for Beginners) which is a huge field by itself and which is based precisely on admitting the failure in building a sufficient protection to qubits and therefore the necessity for an active intervention to protect quantum information from degrading.
Different approaches to hybrid quantum devices exist, where the information is processed in qubits that interact strongly and quickly with each other and our external stimuli (and also with noise sources) and subsequently stored in qubits that interact very weakly and slowly with every stimulus (desirable or not). Again, this family of approaches is too much dependent on the technological details to make general statements.