Its really very simple:
40 rounds: 20 rounds standing in foxhole, 20 rounds prone. There is no 'scoring' per se, a hit is a hit. You must score 26 hits to qualify as marksman.
Depending on where you qualify, you have one of two ranges you shoot on:
1 - 300 meter 'lane' with mechanical pop-up silhouettes on the left and right sides interspersed at 50, 100, 150, 200, 250, 300 meters. They pop up, you shoot them down. They stay up for 1 to several seconds depending on the range. A computer records your hits.
2 - especially in reserve and support units - a large paper target at 25 yds. On this target are several silhouettes intended to represent the size of normal silhouettes at the varying ranges. You get a certain time limit to take all 20 shots from each position but can put no more than 4 (IIRC) holes in each silhouette. Achieves the same effect I guess but, let me tell you, it is a much more accurate test of your skills when you are actually swinging your rifle back and forth across the lane and trying to engage two targets that pop up together before they fall down.

Hope that helps!