It's not a random glitch, it's called Z-fighting. It happens when 2 or more faces occupy the very same space. Then Blender doesn't know anymore which of the faces should be in front and which ones should stay in the back. It also means that you need to clean your topology.
One method of checking for problems is to be in Vertex- or Edge Select Mode with nothing selected and hit CTRLSHIFTALTM to select all edges and its verts that share more or less than two faces.
Here are 4 cross sections. The left one is how it should be. It has a clear inside and a clear outside and is the desired outcome. Every edge only shares two faces.
The second and third one have an internal face where it won't show from the outside. But CTRLSHIFTALTM will highlight all verts or edges that are connected to that face. This little rascal will also prevent you from recalculating normals correctly.
The fourth is where Z-fighting will occur. While it's not visible, there's now 3 small faces on top of one larger face because I scaled them to 0 on the x axis. And since they're not the same size, removing doubles won't do anything.
Sadly, it's perfectly possible to create Z-fighting topology that the mega shortcut won't detect. Just add a cube, duplicate it without moving it and then scale it down a bit on a single axis.