Transcription factors are proteins that bind to specific DNA sequences in order to regulate the expression of a given gene.  There are approximately 1,400 transcription factors in the human genome and they constitute about 6% of all human protein coding genes. The power of transcription factors resides in their ability to activate and/or repress wide repertoires of downstream target genes. The fact that these transcription factors work in a combinatorial fashion means that only a small subset of an organism's genome encodes transcription factors.
Transcription factors function through a wide variety of mechanisms.  In one mechanism, CpG methylation influences binding of most transcription factors to DNA—in some cases negatively and in others positively.  In addition, often they are at the end of a signal transduction pathway that functions to change something about the factor, like its subcellular localization or its activity. Post-translational modifications to transcription factors located in the cytosol can cause them to translocate to the nucleus where they can interact with their corresponding enhancers. Other transcription factors are already in the nucleus, and are modified to enable the interaction with partner transcription factors. Some post-translational modifications known to regulate the functional state of transcription factors are phosphorylation, acetylation, SUMOylation and ubiquitylation.
Transcription factors can be divided in two main categories: activators and repressors. While activators can interact directly or indirectly with the core machinery of transcription through enhancer binding, repressors predominantly recruit co-repressor complexes leading to transcriptional repression by chromatin condensation of enhancer regions. It may also happen that a repressor may function by allosteric competition against a determined activator to repress gene expression: overlapping DNA-binding motifs for both activators and repressors induce a physical competition to occupy the site of binding. If the repressor has a higher affinity for its motif than the activator, transcription would be effectively blocked in the presence of the repressor.
Tight regulatory control is achieved by the highly dynamic nature of transcription factors. Again, many different mechanisms exist to control whether a transcription factor is active. These mechanisms include control over protein localization or control over whether the protein can bind DNA. An example of this is the protein HSF1, which remains bound to Hsp70 in the cytosol and is only translocated into the nucleus upon cellular stress such as heat shock. Thus the genes under the control of this transcription factor will remain untranscribed unless the cell is subjected to stress.