Movement does not have to happen all at once

You choose how much movement to spend at each point in the turn. The remaining distance stays available until the turn ends unless a rule changes your speed or movement.

You can act in the middle of movement

Moving 15 feet, casting a spell with your action and then moving another 15 feet is legal under the normal movement structure if nothing else prevents it.

Extra Attack allows movement between weapon attacks

If an Attack action contains more than one weapon attack, those attacks do not need to happen from the same square. You can attack, move and attack again.

Movement costs still apply to each segment

Difficult terrain, crawling, climbing, swimming and other costs apply to the distance actually traveled in each part of the turn.

Opportunity attacks can occur between segments

Splitting movement does not protect you from reactions. If one segment leaves an enemy's reach, that movement can provoke before you continue the rest of your turn.

Dash increases the available amount

Dash grants additional movement equal to your speed after relevant modifiers. That extra distance can also be split across the turn.

Teleportation is not ordinary movement

A teleport effect follows its own rule. It does not consume walking movement unless the feature says it does, and it does not normally provoke the opportunity attack triggered by moving out of reach.