f describes the size of the lens aperture, the hole which lets the light in. A small number like f1.8 describes a bigger hole letting more light in than a larger number such as f8 or f16. Having a large diameter like f1.8 means that you can take pictures more quickly in lower light than you can at something like f8 but also means that less of the frame will be sharp if things in the frame are different distances from the camera. When smaller apertures like f8 are used more things in the picture will be within the depth of field. Depth of field is something that gets talked about a lot.
f1.8 lenses are not stuck at f1.8, you can select other aperture sizes like f2.8, f5.6, f8 or f16.
So, in the case of a f1.8 lens, f1.8 is the maximum aperture size you can select but if you want to you can also select other apertures like f8.
There are also variable aperture lenses such as a 28-70mm f3.5-5.6. Here the biggest aperture you can select is f3.5 at 28mm gradually changing to f5.6 as you approach 70mm but you can also select smaller apertures like f8 when you need to.
Smaller apertures like f8 can be very useful as they allow you to get more of the picture acceptably sharp. I'll post a couple of examples below.
Many things affect lens pricing including build quality and image quality and also sometimes the maximum aperture or aperture range offered. The cheapest lenses tend to be variable aperture lenses which often come with the camera. Lenses like 18-50mm f3.5-5.6 lenses for smaller format APS-C cameras or 28-70mm f3.5-5.6 lenses for modern 35mm equivalent cameras.
Someone will be along with more specific Nikon advice soon but in the meantime I hope the above helps you understanding f (aperture) settings.
And now to those examples I mentioned.
This is a wide aperture picture (small f number, in this case f1.1.) You can see that the subject is relatively sharp but nothing else is.
And this is a similar picture taken with a smaller aperture. Here the subject is sharp and the background is much less out of focus than in the 1st picture.
The only difference between these pictures was the aperture used. I hope this helps.