NGX,Y,Z controls the number of grid-points in the FFT-mesh into the direction of the three lattice-vectors. X corresponds to the first, Y to the second and Z to the third lattice-vector (X,Y and Z are not connected with cartesian coordinates, don't be fooled by the historical naming conventions).
NGFX,Y,Z controls the number of grid-points for a second finer FFT-mesh. On this mesh the localized augmentation charges are represented if ultrasoft (US) Vanderbilt potentials are used. In addition local potentials (exchange-correlation, Hartree-potential and ionic potentials) are also calculated on this second finer FFT-mesh if (and only if) US-pseudopotentials are used.
Mind: There is no need to set NGXF to a value larger than NGX if you do not use US-pseudopotential. In this case neither the charge density nor the local potentials are set on the fine mesh. The only result is a considerable waste of storage. In this case set NG(X,Y,Z)F to NGX,Y,Z or simply to 1. Both settings result in the same storage allocation.
In VASP.4.X all parameters are determined during runtime, either defaults are used - Sec. 7.7 or 6.1 - or NGX etc. are read from the INCAR file, see Sec. 7.2).