I found this somewhere on the interweb that goes pretty in depth into the whole spellcasting. It's long though so excuse the wall of text. I'm not sure how to attach a document....Maybe it will help.
Okay, so caster classes can be separated in different groups.
Wizards: At Lv1, you know 6 spells that are in your spellbook. Out of these 6 spells, you can prepare a number equal to your wizard level + INT modifier. So a lv1 Wizard with 16INT can prepare 4 spells out of the 6 they have. Every additional wizard level you gain, you learn 2 new spells that you inscribe in your spellbook. If you find scrolls that contain spells included in the Wizard spell list, you can scribe them in your spellbook if they are of a level you can cast. So eventually you have way more spells to pick from than the number you can prepare. So you have to be 'guessing' what you might be needing on your adventure that day.
It's like, you own 6 shirts. You have plans to go out for the day, but you don't know yet what to wear. You grab a bag, but it only has room for 4 shirts, so you gotta pick which ones you will bring.
________________________________________
Sorcerers, Bards, Warlocks, Rangers, Arcane Tricker(Rogue subclass), Eldritch Knight(Fighter Subclass): You know a certain number of spells, listed on the class progression table, and you can always cast from among all these spells. Most of these classes will know 2-3 spells when they begin (Rangers get spells at lv2, AT and EK at lv3).
You own 3-4 shirts, and you always carry them around with you.
• Note that Warlocks are different from all other caster classes as regain their spell slots after a short or long rest, unlike other classes who only regain their spell slots after a long rest. (Wizard and Land Druids have a class feature that lets them recover a fraction of their spell slots during a short rest, usable once per long rest.) Furthermore, their spell slots will increase in level as the warlock gains more levels, but will top out at lv5. For Warlock spells lv6 through lv9 and how they are used, make sure you read the Mystic Arcanum paragraph in the Warlock chapter.
________________________________________
Druids, Clerics, Paladins: They have access to their entire spell list for which they have spell slots. So if your level grants you spells slots of 2nd level, it means you can prepare ANY spell from the class spell list among all those of 1st or 2nd level. The number of spells you can prepare is equal to (for clerics and druids) your cleric or druid level + your Wisdom Modifier. For Paladin, it's equal to half your paladin level + your Charisma modifier. Paladins get access to spellcasting once you hit lv2.
You don't directly own shirts, but every morning you get to go to the store and pick your shirts for the day.
________________________________________
For spell slots, imagine your spell slots are coins, or tokens.
Your prepared spells are stuffed inside a vending machine.You can cast a spell by 'buying' it with a spell slot(coin). Some of these spells can be cast at a higher level, indicated by the downwards arrow. So if you want to cast, let's say, Magic Missile, normally a lv1 spell, at 2nd level, it means you have to expend one of your 2nd level spell slot. When you cast a spell at a higher level, read the spell description to know the effects. Typically damage spells will deal more damage, and other spells will let you target more creatures or allies, and/or have longer durations.
If you want to cast Dimension Door, you must have a 4th level spell slot available. If you have only lv3 slots or lower, you cannot cast anything lv4 or above.
For spells that cannot be cast at a higher level, such as Mage Armor, you still CAN expend a higher level slot, but there are no benefits. So, if all you have left are lv3 spell slots, but you want to cast mage armor, you can expend that lv3 slot and cast a lv1 spell from it.
Note that spell slots CANNOT be combined together to create a higher level slot, so if you want to cast a 3rd level spell, but only have 1st and 2nd level spell slots remaining, you cannot combine a 1st and a 2nd to create a 3rd.
And unlike some previous D&D editions, you do not need to prepare your spell slots ahead of time. Older editions had you prepare the spells individually, so if you want to be able to cast magic missile twice, you needed to prepare it twice. In 5th Edition, if you have four lv1 spells (A, B, C, D) as your prepared spells/known spells and three lv1 spell slot, you can cast the same spell 4 times if you so choose, or cast A, A, C, D, or A, D, D, D, or any combination as you need.
________________________________________
Edit: Additional Info:
Spell Attack Modifier, Spell Save DC: While reading spell descriptions, you will come upon such terms as Ranged Spell Attack, Melee Spell Attack, or that the target of a spell must make a 'attribute' saving throw. Your melee or ranged spell attack modifier is calculated by adding your Proficiency Bonus and your spellcasting ability modifier. So for a lv1 Wizard with 16(+3)INT, your spell attack modifier would be 2 (Proficiency Bonus) + 3 (INT modifier) = 5, so whenever you cast a spell that requires an attack roll, Firebolt for instance, you would roll 1d20, add +5, and if your total is equal or above the target's Armor Class, your spell hits, and deals the appropriate damage as indicated by the spell's description. Spells that have you roll a d20 to hit benefit from critical hits just like weapon attacks. Also, if you have to make a ranged spell attack, and you have any hostile creature within 5' of you, your attack roll is made at Disadvantage, even if the target is not that hostile creature. The feat CROSSBOW EXPERT will cancel this Disadvantage thanks to its second bullet point.
NOTE THAT UNLESS EXPLICITELY MENTIONNED IN THE SPELL'S INFORMATION, YOU DO NOT ADD YOUR SPELLCASTING ABILITY MODIFIER TO SPELL DAMAGE, UNLIKE FOR WEAPON DAMAGE.
For Spell Save DC, the formula is the following: 8 + Proficiency Bonus + Spellcasting Ability Modifier.
When you cast a spell that has a Saving Throw, you do not have to roll a d20. Instead, your target must roll a Saving Throw to mitigate/cancel the effects of the spell cast against it. If the spell causes damage, you can go ahead and roll the damage (unless the spell specifies there is no damage on a successful saving throw, then you might want to hold off).
So again with our lv1, 16INT Wizard, his spell save DC would be 8 + 2 (Proficiency Bonus) + 3 (INT modifier) = 13. So if he were to cast Burning Hands, any creature caught in the flames would get to make a Dexterity Saving Throw, as required by the spell's description rolling 1d20 + their Dexterity Saving Throw modifier, and any total of 13 or higher would cause them to only take half-damage on the 3d6 you would roll, again as explained in the spell's description.
________________________________________
Ritual Casting Some classes have Ritual Casting as a class feature - Clerics, Druids and Wizards (Also Warlocks have that as an option, and there is also a Feat for that).
Spells in the PHB that can be cast as a Ritual will be shown like this:
IDENTIFY
1st-level divination (ritual)
Such spells can be cast without expending a spell slot. You simply add 10 minutes to the existing casting time to cast them as a Ritual. So it makes them inefficient to use during combat, but it adds a lot of utility outside of combat, at no cost other than the extra 10 minutes it takes you.
________________________________________
Wizards, Warlocks who went with "Pact of the Tome" and who picked "Book Of Ancient Secrets" as in invocation, as well as anyone who picked Ritual Caster feat, can cast any spell with the ritual tag contained in their spell book without expending a spell slot. In the case of the Wizards, the spells do NOT need to be among those prepared for the day.
So let's assume a wizard with 10 spells total in their spellbook.
They can prepare 6 spells out of these 10 every morning.
Out of the 4 non-prepared spells, 2 have the Ritual tag.
This means that effectively on that given day, the wizard has the choice of 8 spells he can cast from, 6 as normal and spending a spell slot, and the 2 rituals without expending a spell slot.
Note that you can prepare a Ritual spell like a normal spell, and then when a situation arises, you have the option of either casting it as normal by using a spell slot, or casting it as a ritual.
________________________________________
Clerics and Druids can also cast spells as rituals, however in their case, they MUST have included them in their prepared spells list. Otherwise, if a Cleric only has prepared Cure Wounds, Healing Word and Bless for the day, they cannot cast Detect Magic.
________________________________________
CONCENTRATION: Some spells require you to Concentrate on them after casting them. If so, it will be indicated along with the spell's duration.
Duration: Concentration, up to 1 minute
You can only ever have one Concentration spell active at a time. Note that it does not prevent you from doing anything else. Moving, talking, attacking, casting any non-concentration spell, all of this is permitted. If you are Concentrating on a spell, and you wish to cast another Concentration spell, the effects of the first are ended before the effects of the second one occur. For instance, if you were concentrating on a spell that caused the target to make Saving Throws at Disadvantage, and you cast a second Concentration spell that forces the same target to make a Saving Throw, they would roll it normally, as the Disadvantage from the original spell does not affect them anymore.
You can end a Concentration Spell at any time you choose.
If any effect or spell causes you to become Incapacitated, you automatically lose your Concentration.
Whenever you take damage, you must make a Constitution Saving Throw, and the DC is either 10, or half the damage sustained, whichever is higher. Each source of damage is counted independantly. So if a dragon blasts you in the face for 40 damage, you must make a DC20 Constitution Saving Throw. If 5 rats hit you for 1 damage each, you must make 5 separate Constitution Saving Throws, DC10 for each one of them. If you fail the Saving Throw, you lose Concentration.
Note that if you Ready a spell, even one that normally does not require Concentration after being cast ("I'm Readying Grease to cast beneath the first enemy who walks within melee range of our Fighter.", you are considered having cast the spell as normal (which means, you expend your spell slot as normal, regardless of what happens afterwards), and you are required to hold Concentration on your spell until it goes off (picture someone having knocked an arrow on a bow and keeping the bow drawn, but holding off on letting the arrow go). If you get hit between the time of the casting but before you release the spell, you must make a Constitution Saving Throw (as explained above). If you fail, the spell fizzles and ends. You can hold onto a Readied spell until the beginning of your next turn. If you have not cast it before your next turn begins, the spell ends.
________________________________________
ACTION, BONUS ACTION: The majority of the spells have a casting time of either 1 Action, or 1 Bonus Action.
You can, in the same turn, cast two spells, however the requirements are that if you cast a Bonus Action spell of 1st level or higher, the other spell that you can cast in that same turn MUST be a cantrip with a casting time of 1 Action.
There are some exceptions to this, such as the Fighter's Action Surge feature, which gives you an additional Action on the turn you use it. If you use this, then you can cast two spells with a casting time of 1 Action without requiring that one of them be a Cantrip.
(Just keep in mind the Action/Bonus Action requirements if it applies.)
________________________________________
MULTICLASSING INTO DIFFERENT SPELLCASTER CLASSES:
Okay, this is getting a little bit more tricky, so re-read this a few times over if you need to.
Everything I will mention here can be found on p164 (the right half of the page)-165 (the spell slot table) of the PHB.
First off, you determine your overall spellcaster level.
For each level of Bard, Cleric, Druid, Sorcerer and Wizard, add 1.
Take your levels of Paladin and/or Ranger, divide by 2, and round down, then add.
Take your levels of Eldritch Knight (Fighter archetype) and/or Arcane Trickster (Rogue Archetype), divide by 3, round down, then add.
So if you are a Druid4, Paladin 5, and Eldritch Knight7, your spellcaster level would be 4 + 5/2(rounded down to 2) + 7/3(rounded down to 2) = 8.
Refering to the p165 chart, a lv8 spellcaster has four lv1 slots, three lv2 slots, three lv3 slots and two lv4 slots.
Now, you need to refer to the invididual class progression tables to see how many spells of each class you know/can prepare.
As a Druid4, you know 3 druid cantrips, and you can prepare (Druid level+WIS modifier) druid spells every morning. Note that as a Druid4 by itself, you cannot cast any spell higher than 2nd level, so any spell you prepare must be of 1st or 2nd level.
Then as a Paladin5, the class progression table shows you can only cast 1st and 2nd level spells as well. And Paladins prepare every morning (CHA modifier + 1/2 your Paladin level, rounded down - minimum of 1 spell).
Then as an Eldritch Knight7, their spellcasting table shows that you would know 2 wizard cantrips, and 5 wizard spells. Those 5 spells would always be considered prepared, you do not need to prepare them like an actual wizard. And again, the table shows you can only cast 1st and 2nd level spells.
So, notice that none of your classes allow you to cast any spell higher than a lv2 spell, however you have spell slots of 3rd and 4th level. This is normal. This simply will allow you to cast your lower level spells at a higher level, however your basic understanding of magic does not permit you to learn more complex spells for now.
Also, when you have more than one spellcasting class, it is important to keep the spell lists separate, as the spells will be relying on the respective spellcasting attribute for each class.
For instance, you could prepare Cure Wound as either a Druid spell or a Paladin spell. However, if you were to cast it as a Druid Spell, the attribute modifier would be your Wisdom, vs Charisma if you were to cast it as a Paladin spell.
Warlocks: Warlocks are kept separate from other spellcasting classes, as their magic system is entirely different. You do not count your warlock levels when determining your spellcasting level, and their warlock spell slots are also kept separate from those you obtained per the p165 table. However, do note that you CAN use the warlock spell slot to cast spells from other classes, and it also works the other way around. And remember that warlock spell slots are regained on short or long rest, unlike all the other classes who only recuperate them after a long rest.
NOTE THAT CANTRIPS AND PROFICIENCY BONUS ARE BASED ON TOTAL CHARACTER LEVELS, ALL CLASSES INCLUDED.
So if you are a Wizard1/Monk10, your character level is 11, and when reading a Cantrip description, you would cast it as an 11th level character.
For proficiency bonus, just add your total class levels together, and refer to any class's progression table, to find out what your proficiency bonus is. So if you are a Fighter2/Monk5/Wizard6, your total character levels is 13 and your Proficiency Bonus is +5.