You need to pass a state board examination to become licensed to practice in the state where you live.
When you graduate from an accredited optometry degree program, you can apply for a license. In fact, you can apply for licensure as early as the spring of your fourth year in a Doctor of Optometry program.
If you want to focus on a particular field of optometry, you can choose to do a yearlong clinical residency after graduating from an optometry program. Examples of possible specializations include pediatric optometry, low vision services (for the visually impaired), and sports vision.