Come fast and at an angle - step to your opponent and take away one side (angle your body). Most players are right footed so approaching the attacker from their right (your left), will allow you to push them to their weaker foot. Approaching your opponent fast helps you have more space between you and the goal you are defending. This will provide you with at least a second chance.
Arms length - don't get to close or come in too fast. You want to be close enough to where you can barely touch your opponent. If you ever catch yourself chasing someone, then you likely got too close.
On your toes - once you get to the right distance of your opponent, get on your toes and be ready to run with them. Bend your knees and take small bounces shifting your weight from the balls of your feet. Your heels should never touch the ground.
Don't Bite - never ever commit your foot to attempt to steal the ball. This is the hardest thing for a young player to break. Great players want you to bite because they can quickly cut the other way while you are still trying to re-plant your foot and change directions with them. Be patient, keep your eyes on the ball / their hips and be ready to run with them.
Put a body - this is probably one of the most important aspects of defending. Once an attacker attempts to run past you, leverage your body in between them and the ball. Don't use your arms or reach for them with your hands. Physically connect your hip to their hip and squeeze yourself between them and the ball.
Never give up - you don't have to be perfect to win 1 v 1 battles but you do have to be vigilant and tireless. Just because you made a mistake and the attacker got past you, does it mean that you failed. You still gave yourself a chance to recover and try again because you followed Step 1.