Multi-class spell casting rules in the PHB (p.164) or basic rules clearly explain how known and prepared spells work if multiclassed into 2 or more classes (or subclasses) with Spellcasting:
Your ability to cast spells depends in part on your combined levels in all of your spell casting classes and in part on your individual levels in those classes. Once you have the Spellcasting feature of multiple classes, use the rules below. If you use multiple classes but you only have the Spellcasting feature of a single class, you follow the rules described in this class.
Known and prepared spells. You determine the spells you know and can prepare for each class individually, as if you were a single-class member of that class. For example, if you are a Ranger 4 / Wizard 3, you know three first-level Ranger spells based on your levels in the Ranger class. As a third level wizard, you know three wizard traps and your spell book contains ten wizard spells, two of which (both you got when you reached the third level as a wizard) can be second level spells. If your intelligence is 16, you can prepare six wizard spells from your spellbook.
Each spell you know and prepare is associated with one of your classes, and you use the casting ability of that class to cast the spell. Similarly, a spellcasting focus, such as a sacred symbol, can only be used for the class spells associated with that focus.
If one of your powers increases power to higher levels, this increase is based on the level of your character and not on your level in a particular class.
As explained above, when you perform a multiclassification in multiple spell casting classes, you determine your known and prepared spells as if you were categorized into one class in each of these classes.
Note that certain class / subclass characteristics (such as the additional magic secrets of the Lore Bard Wizard, cleric domain spells, or paladin oath spells) may provide additional known or prepared spells that are not not counted in your known / prepared spell count for this class. . If this is the case, the class / subclass feature description will tell you whether or not these spells are counted into your known / prepared spell limit.
What about warlocks?
You may notice that the rules I've mentioned so far mention the Spellcasting feature in particular. So you can ask how they interact with warlocks, which have the Pact Magic feature rather than the Spellcasting feature. On this topic, the multiclass mailing rules simply state:
Magic Pact. If you have both the Spellcasting class feature and the Pact Magic class of the Warlock class, you can use spell locations obtained with Pact Magic to cast spells that you know or have prepared for. from classes with the Spellcasting class function. can use the spell locations you get from the Spellcasting class function to cast warlock spells you know.
Technically, they do not mention how known spells are determined for multiclass warlocks with another class, but only how multiclashing interacts with their Pact Magic locations and which slots can be used to cast warlock spells. However, based on the stated logic and the absence of contrary rules, this seems clear: your known warlock spells are determined as if you were classified as warlocks, as in any other class of casters.
The rules designer, Jeremy Crawford, unofficially confirms that the same is true in a series of tweets from December 2017:
The cleric spell casting function indicates that you can cast spells up to your spell location. Pact Magic gives you higher level spell locations. can a warrior level 1/5 cleric prepare for Animate Dead? since Warlock does not have a spell function, do not use multiclass rules
Launching multiclass spells. You determine the spells you know / prepare for each class individually, pretending that you have only this class. Slots from the multiclash rules do not apply. Do you have 1 level in cleric? You prepare cleric spells as a first-level cleric.
"If you use multiple classes but only have the Spellcasting feature of a single class, you follow the rules described in this class." The Warlock does not grant the Spellcasting feature, so he would follow the Cleric "Spells must be at a level for which you have spell locations." Is it always wrong?
Keep reading, starting with the following sentence: "Known and prepared spells …"
"If you have the Spellcasting feature of multiple classes, use the rules below." In this case, I would not have the Spellcasting feature of more than one class, so the rules below for known and prepared spells would not apply.
Continue all along the page. You will get the "Pact Magic" section, which explains how Pact Magic interacts with Spellcasting. This has no effect on what you can prepare.
The spell casting feature does not mention where the spell locations should come from.
Now that you have re-read the multiclass rules, let's go to the cleric. The first sentence of "Preparing and Casting Spells" reads as follows: "The cleric's chart shows the number of spell locations needed to cast your spells …". This initial text opens the way for the following in this rule.
"Spells must be at a level for which you have spell locations." The text in Prepare and Cast Spells does not explicitly state that it only applies to Cleric spell sites, however. I do not think the first line limits you this way.
When writing this rule, I started with this sentence for a reason: contextualize everything you read after this rule. The sentences in our rules are not meant to be interpreted in isolation from each other.
Thus, it is clear that the determination of known / prepared spells when multiclassed in a warlock is supposed to work the same way as for any other combination of spell casting classes.
Let's go back to the example:
For example, if I play a multi-class character with 1 level in the warlock, 2 levels in the bard and 3 levels in the paladin, how can I determine which spells I know / have prepared?
We need to examine the casting feature and class table of each class to determine the number of known or prepared spells you have for each class:
The warlock board shows that a first-level warlock knows 2 traps and 2 additional spells. And according to the Pact's Magic feature, "At 1st level, you know two first-level spells of your choice in the list of warlock spells." (If you are learning a new spell or replacing an existing spell with a new one at higher levels of warlock, your new spell should be at a level no higher than your Pact Magic slots.)
According to the bard table, a level 2 bard would have 2 spells and 5 additional spells. As in the case of the Warlock Pact's Magic feature, the Spellcasting feature of the bard indicates that your spells other than those in the trap must be at a level for which you have spell locations; as the Bard chart shows, a level 2 bard only has level 1 spell locations, so all 5 spells must be type 1.
Finally, paladins prepare their spells instead of knowing / learning them. The Paladin's Spellcasting feature indicates that you can prepare "a number of paladin spells equal to your Charisma modifier + half your paladin level, rounded to a minimum (at least one spell)." He adds that spells must be at a level for which you have spell slots; according to the Paladin table, a 3rd level paladin has only 1st level spell locations. Suppose your paladin has a charismatic score of 16, and therefore a charismatic modifier of +3. This means that you can prepare a spell count equal to your Charisma mod (3) plus half of your Paladin level (3/2, rounded to 1), for a total of 4 spells.
However, it is not everything. On the 3rd level, the paladins receive the Sacred Oath function; each oath gives them spells at specified levels. Your oath spells are always automatically prepared and do not count in the number of spells prepared by the paladin (and are still considered paladin spells for you). The paladin oath oaths of the level 3 paladin devotion oath are protection from evil and good and sanctuary. This brings to 6 the actual number of paladin spells prepared.
So, as a Warlock 1 / Bard 2 / Paladin 3 with a Charisma score of 16, you:
- know 2 warlock spells and 2 1st level warlock spells
- know 2 bard cantrips and 5 first-level bard spells, and
- prepare 4 first level paladin spells and 2 always prepared oaths
the spells specified in the subclass description (for example, protection against
bad and good and sanctuary for a paladin of devotion)
You would like do not have access to level 2 or higher spells in any of these classes unless you have taken at least 3 total levels of Warlock or Bard, or at least 5 total levels of Paladin.