At recruit training you fire the traditional KD marksmanship course.
It is 50 rounds fired at 200 (25), 300 (15) and 500 (10)m or the yard equivalent depending on which coast you go to. A hit to the black is 5 points from there, there are several rings around the targets (either 12" bulls eye at 200 and 300 slows, 36" silhouette at 200 and 300 rapids or full sized silhouette at 500m slow fire) that will be at a reduced point value all the way down to 2 points. At 200 m for in the slow fire you will shot 5 round per standing, kneeling and sitting and a 10 shot standing to sitting rapid fire with a magazine change. At 300 meters you will fire 5 rounds slow fire in the sitting position and than 10 rounds in the rapid fire from standing to prone with a magazine change. At 500 meters you will fire 10 round slow fire. There is a max of 250 points, with expert at 220 points. In the FMF you will fire a sustainment course which is a modification of the KD course with hit or miss scoring.
As for pistols, you will not qual at boot with them. Only Marines whose TO billet requires them to carry a pistol will qualify with them (Officers and SNCO and a few junior Marines if their billet requires it).