Let's start with something counterintuitive: Breath-hold training is not about "enduring"; it is about relaxing. The reason you want to breathe is mainly carbon dioxide buildup pushing you, not oxygen having run out—so "ten more seconds" is pushing a sensation, not a safety margin, and accidents often happen in those extra ten seconds.
To train safely and effectively, follow this order:
Get the breathing preparation right first. Two to three minutes of relaxed diaphragmatic breathing, then one final natural inhale; never hyperventilate—that is taking out the alarm and then lighting the fire.
Start with supervised static apnea. There must be someone in the water with rescue capability; for CO2 tables on land, it is also recommended to have someone with you—do not chase records alone in a room.
Stop when your body gives signals. A strong urge to breathe, involuntary leg contractions, and blurry vision are all signs to end the session, not signs that you are "about to break a record."
Do not do hypoxia training alone. Full-lung long-distance dynamic apnea and similar training carries high risk, requires an instructor and a safety diver to be present, and belongs in advanced courses.
Back to the question itself: How do you hold your breath in freediving? The answer is to first learn when not to hold it. Keep every breath-hold within a buddy system and the rules, and your times will naturally go up—rushing is the only thing that will set you back.