Problem: you're using a brush in Photoshop, and you hold the Alt or Option key to temporarily switch to the Eyedropper tool and sample a color. But when you click to sample, it's changing the background color instead of the foreground color.
Solution: watch this video :)