Get it checked and. Splint if there no fracture and body tape to the other finger, use Motrin as well, it take about six weeks to heal.
Be seen. I would probably be seen for an xray just to make sure there is no fracture. If it is not broken, but just "jammed" then ice and early motion can potentially help. If motion is painful then buddy taping it to the other finger can sometimes help.
Ice splint move. Ice is a great start. A second thing is splinting. If you are swollen even if you do not have a fracture a bruise to the joint will casue swelling in the joint. The joint tends to stay bent at about 45 degrees because the joint capsule's maximum volume is at about that degree of bending. The swollen tissue and fluid "pushes" the joint into that position finally when swelling goes down... motion.
Splinting. Make sure it is not broken.