Some spells require you to maintain concentration in order to keep their magic active. If you lose concentration, such a spell ends.
If a spell must be maintained with concentration, that fact appears in its Duration entry, and the spell specifies how long you can concentrate on it. You can end concentration at any time (no action required).
Normal activity, such as moving and attacking, doesn't interfere with concentration. The following factors can break concentration:
The DM might also decide that certain environmental phenomena, such as a wave crashing over you while you're on a storm-tossed ship, require you to succeed on a DC 10 Constitution saving throw to maintain concentration on a spell.