For this (surprise!) you will need an onion and a sharp knife. This is what an onion and a sharp knife look like.
Cut off the top and bottom of the onion.
Slice down through a layer of skin and peel off. I normally take off one of the white (see through?) layers as well because lately the outside layer has been kinda gross. Up your game, local shops.
Stand the onion on one of its newly flat edges (where you cut off the top or bottom), and slice in half.
Get one half of your onion, and make incisions lengthways along the onion, leaving a gap at the top so it holds together. I’ve left quite large gaps because I only wanted it roughly diced, but you can put them closer together for a finer dice.
Holding your onion sides and being careful about that knife, cut the other way along the onion to dice it.
Once you get to the bit that has no incisions on it, you can just roughly chop that into pieces.