Any force like gravitational force, frictional force, electric force. magnetic force etc. may act as a centripetal force. Some of the examples of centripetal force are
(i) In the case of a stone tied to the end of a string whirled in a circular path. the centripetal force is provided by the tension in the string.
(ii) When a car takes a turn on the road, the frictional force between the tyres and the road provides the centripetal force.
(iii) In the case of planets revolving round the Sun or the moon revolving round the earth, the centripetal force is provided by the gravitational force of attraction between them
(iv) For an electron revolving round the nucleus in a circular path, the electrostatic force of attraction between the electron and the nucleus provides the necessary centripetal force.