An apprentice is a novice undergoing an apprenticeship under a skilled practitioner to learn a craft or trade, while on the job.
Traditionally a master craftsman could take on a young person (about the age of 14) under contract for about 7 years. After that, if the apprentices continued work with the master, it would be as a journeyman. An apprentice would be part of the master's household and could be expect to do chores for their master both household and craft related.
More modern apprenticeship have a more boss/employee type of relationship, and does not start until the apprentice has reached the minimum school leaving age, but this still likely to be a legal minor, but such a case the apprentice will still live with their parents, not their boss. A shorter modern form would be internship, but an intern is expected to know more about the craft starting than an apprentice, normally from some form of tertiary school.
There are also more informal apprenticeships, where a child learns the family trade, basically starting as soon as they're old enough to do chores.
Apprentices and spanking
While the master and apprentice do not always archive the surrogate parent/child relationship, the master was always considered a guardian and responsible for their apprentice, and had the responsibility to discipline their apprentices in loco parentis.
In literature, some stories of master/apprentice CP have a domestic (parent/child) feel, but in most, the master is a more distant authority figure and punishments are given in a more formal and distant fashion, and often harsher than a parent would do it. Apprentices would also be chastized by the journeyman who was their superior as well. It was not too unusual for an apprentice to run away from their master if the beatings became too much to bear. Examples of master/apprentice CP in mainstream fiction are found in Cervantes's Don Quixote and in Wilhelm Busch's Maler Klecksel; in non-fiction they are found in many autobiographies up to the mid-20th century.