macro symbols and function names starting with one or two underscore characters, _... or __...
are mainly those that are provided by and reserved for use by the 'system', that generally means the C compiler, and it's supporting libraries.
You should Not start symbols or function names with underscore for those names that you create yourself.
This is to reduce the possibility of confusion, by the same name beeing used for different purposes.
Read a C language textbook, or XC compiler User Guide, about: Reserved keywords and symbols.
Names starting with double underscore, like __builtin_... or __delay_ms(10);
are extensions to the standard C language,
that are provided by the compiler, mostly for use with the actual microcontroller in use.
In embedded applications we often deal with hardware peripherals or specific processor properties,
that are supported by extensions to the basic C programming language.
Some developers may prefer to wrap any and all code that deal with hardware dependencies,
into a interface layer that translate into your library or utility design.
Such that in application code, there will be no need to use any symbol or function starting with a underscore _.