If you have a micro:bit at home you can create your code on the website:
https://makecode.microbit.org/

When your code is ready you need to download it to the micro:bit. This can be the tricky bit! Here's some animations to show you how

  1. Plug your micro:bit into your computer with a USB cable. Some USB cables are charging cables only. You need a data cable, like the one that comes with an android phone.
  2. Select Download
    1. In Chrome the file will go to your Downloads folder. Go to your Downloads folder and drag your file onto the micro:bit
    2. In Internet Explorer it will ask you where to save your file to. Select "Save As" then select the micro:bit