Quote Originally Posted by Kirdra
The data is best kept private so you can explictly control how objects are used. The public section provides the interface to the user. Also if there is an error causing a member to take an illegal value you know that it was one of your member functions.
To further expand on what Kirda is saying. He is talking about making the data withing your class only accessable by your class via the private keyword.
Small Example.
Code:
class Dog
{ 
    public:
        //this function will set the age of our dog
        void setAge(const unsigned int setAge)
        {
            age = setAge;
        }
        //this function will get the dog's age
        unsigned int getAge() const
        {
            return age;
        }
    private: //this make the data only accesable to your class 
                 //you cannot do .age on this or you will get an error
        unsigned int age;
};