Dear Student,
A rolling ball comes to rest after moving some distance because there will be a force called frictional force which oppose its movement. We can define friction as when two surfaces slide over each other, the force which opposes this motion is called friction.
Regards