Can Someone explain this part of Casting to me?

I’m trying to understand the “(AActor* OtherActor)” part in the below code:

void ATestingFeatureCharacter::NotifyActorBeginOverlap(AActor* OtherActor)
{
if (ARotatingActor* RotatingActorCheck = Cast(OtherActor))
{
RotatingActorCheck->SetbCanRotate(true);

if anyone can explain it clearly i’d really appreciate it.
Thank you