I like this question because it gets to the heart of what GPs do. It is a challenging job as you need to have a very broad knowledge base about lots of different conditions.
Some of the time we are recognising patterns of symptoms which suggest a particular diagnosis. Other times a diagnosis may not be immediately obvious and we start by ruling out very serious or life threatening conditions: for example in a child with a rash we would want to exclude meningitis. Then we may need to order some investigations, trial a treatment or refer the patient to another specialist.
It helps if you curious, persistent and willing to review your previous diagnosis if it does not quite fit. We can all make mistakes and recognising the mistake, communicating it to the patient, rectifying it and ensuring it does not happen again are crucial steps after any clinical error or near miss.