What algorithm does collision detection system use?

I’m making a 2D platformer, and my plan is to develop my own collision system. I’m using AABBs and my idea was to use space partitioning, or maybe sweep-and-prune.

But I wonder, ¿how does Unity’s native collision system work? ¿What algorithm does it use? ¿Does it even make sense to develop a collision system already having a fine one? I will do it anyway (just for fun), but it would be great to know.

I think Unity uses Box2D for 2D and NVIDIA PhysX for 3D physics.