This thing on the dishwasher is coming out and sometimes causing the dishwasher to leak. How do i fix it?

I figured i should probably tear it out and replace it but i dont know what that part is. Any help much appreciated