You can add the modifier private to any EGL declaration. The exact meaning depends on the context, but in general private limits the scope of whatever is being declared. There is no "public" EGL keyword. EGL assumes that anything you do not declare as private is public.
The private keyword limits the scope of a function, variable, or constant to the part in which it is defined. No outside function can call a function or access the value of a variable or constant marked private, even by using a fully qualified path. Thus you can create helper functions and local variables that remain accessible within a single part only.
When you define a top level part (such as a Program or a Library) as private, that part is private to its package, and cannot be imported or used by parts in another package.
Variables defined within a function are by definition private to that function and statements outside that function cannot reference those variables. No modifier is needed on the declaration.
While you can legitimately use the private modifier within a program or handler, you most commonly use it in a library or a service. Note that variables and constants are not visible outside a service in any case, so the function declaration is the only place in a service where it makes sense to use the private keyword.