I did a school project where we had to invent a product and a Photochromic windshield was my idea. So I was wondering if it was already patented by someone else?
It is not uncommon to find out that someone has a patent related to your idea. But that doesn't necessarily mean that you can't make the invention or obtain your own patent.
It depends on the patent claims. Your windshield design may be sufficiently different so that it does not infringe. If it does infringe, it may be possible to modify the design enough so that it doesn't infringe.
If your design does infringe and you are not able to change the design and you still want to import/build/sell that design, you still have a couple of options. You may be able to license the patent or purchase the original patent outright.
Again, it depends on the particulars of your invention. If it isn't covered by this or any other similar patent out there, and it is not an obvious combination, you still may be able to obtain a patent.
You may also be able to improve upon an existing design and obtain a patent for that.