Original: The human and their Mamodo gain these spells through experience and hard work.
Simplified: When one enters the world, they must find a human to be their partner and to use a book of spells that came with them. Only humans can read the spells and cause the Mamodo to do a certain action.