Thank you for your question. Dr Sean has given a great answer for your question, but I would like to add that perhaps getting assessed first is important. A LLD can be either actual or apparent. What I mean by this is in some situations there can be an ACTUAL different in leg length after measurement, but in situations where there is an apparent leg length different, it might be due to a pelvic or lower back issue.
Getting yourself assessed is the first step - this can be either by a MSK/Sports Physician, a physiotherapist or a podiatrist. You can then try to correct things with a combination of therapy, orthoses or other treatments. In situations where you are having considerable pain or a significant LLD, then a surgical option is reasonable to correct the difference.
I hope this adds to your information.
BW
Dr Dinesh