What is this and what does it do?

Using headlight relays on these girls is a great idea, but I just would not use THAT one. Looks like it's pretty bad shape. Remove the cover and look inside. Crackedback on here sells a little kit for relays.