an incomprehensible function with :: and with the name of the event

why is there a function with the names and :: and, for example, BeginPlay in the script of the object

Example: Object Name::Event()
{
–script
}