There are virtual try-on system in some online stores which supports you to try on the glasses frames you choose online, so that you can know how they will look on you. After you choose one frame, you need to upload a photo of yourself and see if it fits on your face. Make sure the face should be straight on and level in your photo.
You can go to any optical store to have an eye exam. The optometrist will measure your glasses zise together with your prescription. Then you can get your glasses online with your glasses size and prescription.