Get board.vid and board.pid value in code
The preprocessor will sub in the values for the names "USB_PID" and "USB_VID"

this line in "platform.txt" grabs them and makes build flags for them: 

build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'


the -D* option in the build is equivalent to the following lines being in the code

#define USB_VID /*value of build.vid*/
#define USB_PID /*value of build.pid*/
#define USB_MANUFACTURER /*value of build.usb_manufacturer*/
#define USB_PRODUCT /*value of build.usb_product*/


If you are curious, they are used by the libraries in "USBCore.cpp". Also, they will never be defined for devices they don't apply to.