From what I understand, T-cells are constantly traveling in the body, inspecting cells by looking for antigens. If they're self antigens, then the T-cell doesn't attack, whereas if they're non-self, they attack. My question is how does a T-cell know when it just inspected a cell? Does the T-cell leave something behind on the cell to mark it as checked or does the cell itself present something on its surface to indicate that it has just been checked? If there is no such system, then what prevents the T-cells from being stuck in a loop, and just inspecting the same cell over and over?
Your question spans two activities of T-cells that are related to each other: migration and activation. T-cells that usually stay in lymphoid organs migrate to non-lymphoid organs with different mechanisms for each T-cell subtype. When migrated to non-lymphoid organ, the T-cells move through the organ looking for infected cells.
As you can see in the image below, there are many mechanisms for moving T-cells across the endothelial layer.
The main idea for all three mechanisms is that the tethering of the T-cell to the endothelial layer is weak. Because of the weak interaction, the blood flow causes the T-cell to move across the endothelial layer while still being attached to the endothelial layer. This is known as rolling. Other stimuli (usually chemokines) such as CCL21, CCL25, or ICAM 1 are needed to induce T-cell to migrate across the endothelial layer. This is important because these chemokines are expressed where there is inflammation. For example, there is a correlation between CCL25 level in the gut and inflammation in the area.
T-cells express α4β7 integrin or CCR7 that bind T-cell to the endothelial layer. Central memory T-cells and naive T-cells express CCR7 and CD62L and thus reside preferentially within the secondary lymphoid organs. Effector memory T-cells bind to gut endothelium with α4β7 integrin, CCR9, and LFA-1.
CCL21 is expressed by both stromal cells of lymph node paracortex and endothelium of lymphatic vessels to assist migration of activated dendritic cells and naive and central memory T-cells to lymph node respectively. Dendritic cells are professional antigen-presenting cells (APCs) that migrate to lymph node where it can interact with T-cells more efficiently.
One important concept to take away from T-cell activation is that there needs to be direct contact between MHC complex and T-cell receptor (TCR).
T-cells that have moved into the lymph node interact with dendritic cells, which have high MHC complex concentration on their cell surface. This leads to subsequent activation of the T-cell leading to release of cytokines such as IL-2 leading to proliferation of activated T-cells.
The activated T-cells now are able to freely move across the endothelial layer of non-lymphoid organs to infiltrate and look for infected sites. (Naive T-cells enter endothelial layer of non-lymphoid organs as well but this is chemokine independent nad thus not a reaction to inflammation).
Difference between naive T-cells and memory T-cells: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1782715/
Dendritic cell's role in immune response: http://lab.rockefeller.edu/steinman/dendritic_intro/immuneResponse
Memory vs naive T-cell migration: http://www.nature.com/icb/journal/v86/n3/full/7100132a.html
Dendritic cell and role of CCL21: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3078419/
Naive T-cell non-lymphoid organ infiltration: http://onlinelibrary.wiley.com/doi/10.1002/eji.200535539/full
CCL25 and inflammation relation: http://www.sciencedirect.com/science/article/pii/S0896841116300014
T-cell does not inspect any cell until the cell shows a piece of the "non-self" antigen on it by the MHC.
The helper T-cell connects with the antigen which is on the cell's surface. The T-cell sorts the cytokines that activate the cytotoxic T-cell to divide and form a colony of cytotoxic cells. The colony of cytotoxic cells then attack the "non-self" antigen expressing cell.