Initiative is described on p.189 of the PHB. It states that initiative determines the order of turns during combat. Participants make a DEX check to determine their place in the queue. DM makes one roll for the monsters. Rolls are sorted, with the highest being at the top of the initiative order.
The DMG on p. 247 describes three ways to keep track of initiative: hidden, visible, and index cards. Nolaria is using the visible approach using the Roll20 gadget. There are a number of optional rules on p.270 of the DMG. We are not using any of them.
While it assumed that once rolled, play starts from the top of the initiative list, that isn't specified in the rules (at least the rule books).
Playing initiative will followed the following modified rules, henceforth.
The DM announces when it is time to roll initiative. This can be triggered by any of the following events:
A surprise attack or ambush is initiated from either side.
In a confrontation, a player or monster makes a action, such as an attack.
Any time at the DM's whim.
If players are uneasy about a situation, they may prepare reactions in advance. This must be entered into the chat log. If not, it is assumed that no preparation is made.
If a surprise attack is launched, play starts with the first character or monster on the attacking side. See no. 1 above.
If a triggering action, plays starts with the character or monster making the action. See no. 2 above. Play follows the initiative order thereafter, looping to the top of the list once the bottom is reached.
In real life, combat moves happen all at once. This can lead to situations of mutual kill for example, or attacks canceling each other out. Determining initiative order in real life is easy: every participant has initiative all the time. This doesn't translate well to a game as chaos would result. Instead, an order of play is determined using initiative.
While not realistic, this is the way the 5e rules system specifies combat. There are provisions for reactions and ways to prepare for actions, but combat doesn't happen all at the same time during a round. A lot can happen in a six second round, but for the sake of game mechanics, actions don't happen simultaneously. The above changes, while small, add a bit more logic to an otherwise intense situation.
Also, please don't over-think your character actions. Six seconds doesn't provide enough time to optimize. Be warned: if you try to think too much during your turn, the DM may decide to skip your turn while you think.