Well the basic idea of a class is to group together closely related data, and provide class functions which deal with that data, so I am not sure what you mean - it's not really one or the other.
The concept of a class is a main component of the OOP paradigm - one makes objects from classes. There are lots of different things which come from that, like passing messages between objects, polymorphism, design patterns etc.
Those two are orthogonal, they are not replacement to each other. Generally class either contains member functions or there are standalone functions operating on class instances.
Generally, if you need to implement a single action, without saving any persistent data, you want a function: find a greatest common divisor, sum all numbers in array.
If you have an entity with persistent data and some inherent behavior, if you need to save some state in addition to some actions, you want a class.