It kinda depends on what you're making.
If you're making a game about physics, you could conceivably write your own physics engine, however I do not recommend it. There are many 2D and 3D physics engines already out there that you can use that will save you months of work.
My first time using Box2d was intimidating, and I'll admit it has a fair learning curve. However unless you're a physics genius, the amount of time you spend figuring out Box2d will be significantly less than the amount of time you'd have spent writing your own physics, and I can guarantee the results will be better.
If you insist on writing your own physics... well you've been warned :P There are many articles online about 2D ball to ball collision, you'll just have to do the hard work of converting articles to code. If you aren't worried about spin, it's not too unreasonable of a job... but it will still be a lot of work.