So basically, you can move, and take an action, you can move before or after your action, and it doesn’t matter when. Then, depending on your class you can Attack, Cast a Spell, Attempt an ability check, flee, dash, disengage, improvise, ready an action ect. If you attack, are a martial class and level 5 you get an extra ATTACK, which you can only attack with, if a weapon has a loading property you can only attack once with it, unless you have the crossbow master feat. After you use your action, you can decide to use a bonus action, which can be a spell that has a casting time of a bonus action, or use a class ability like action surge for the fighter, which gives you another action to use. After that your turn has ended, but you’re still able to do some things. If you have a class ability, spell, a readied action, or an enemy moves out of your reach with a casting time or use time of a reaction you can use it once against a creature in the moves range.