Run it under cold water. If it's a bad burn put some ointment on it and wrap it in a band-aid if you need to be picking up or using that finger, but otherwise let it get some air. Also if it hurts tomorrow a cup of ice works really well
I did something like that when I was little...I somehow managed to touch the metal part where the hot glue comes out while hot glue was coming out and I morphed my finger print (you can still see the scar) so I sympathize with the pain.