The foreground, put simply, is the opposite of the background; which is the part of a photo, painting, scene, etc. that's the farthest away. So the foreground, is the closest to you. Lets take the Mona Lisa for example. The woman in said picture is of course, the foreground. Behind her, is the middle ground and background. The middle ground in this case, is the area behind the foreground but in front of the background. The grounds can be shown through subtle queues with coloring.
Hope that helped!