When you inherit from a base class, access specifiers control how base class members appear in the derived class. public inheritance: public stays public, protected stays protected.
This is the most common form. Use it for "is-a" relationships. protected inheritance: public becomes protected. Useful when you want derived classes to access base members but not external code.
private inheritance: everything becomes private. Use this for "implemented-in-terms-of" relationships where you want base functionality but not its interface.