How initiative works in 5e is simple. Everyrone rolls a d20. Add your dexterity modifier(take your Dex score and subtract 10, then divide by half, rounding down, keep in mind that if it's negative that means it gets bigger, not smaller. Ie -2.5 becomes -3, not -2. )if you figure out who initiative works, can you explain it to me? I've never really gotten just how it goes...
There might be some feats or subclass features that give you a bonus to initiative, but those are rare. In a case of a tie the person with the higher dex score goes first, if they are equal they can roll another d20 to break the the tie, or PC's can let one another go first. The DM might decide to roll one initiative for all the bad guys, or separately for some groups or all of them, depending on the number of bad guys and the DM.
Now you have everyone's initiative for that combat. Every round in a combat people take their turns in order of highest initiative to lowest. This is called the initiative order. You can't change when your turn is. However, on your turn you can "Ready" an action or movement. Players with previous edition experience often call this "holding an action" but the 5e turn is technically "readying" one. So you pick someone specific you want to do, casting a spell, running away, making a specific attack(I swing my sword at whomever come through the door first" is acceptable, anything vaguer isn't,) You have to state something that will trigger your readied action to go off. If it doesn't happen before you next turn you can do something else. If you readied a spell and the trigger hasn't occurred by your next turn then that spell is lost and the spell slot wasted. HOWEVER your initiative stays the same.
Does that help?
It occurs to me that there is a lot of help on the web for D&D.
Notably youtube has a lot of fancier stuff.