I can't focus in class and im always anxious can I take anything for this?

Anxiety meds. As dr puppala says, meds are not the only answer, but may be helpful. Benzodiazepines can help for severe anxiety acutely, but can also be addictive and cause sedation. For more chronic anxiety, many of the antidepressants can be useful. Buspirone is a medication that can also be useful for some people and is not addictive.
Anxiety. Anxiety certainly can affect the ability to focus. There are many types of treatment for anxiety that can help, including deep breathing exercises, meditation, yoga. Therapy can help get to the bottom of the reason for anxiety and help manage it. Prescription medicines can be a useful addition, but in my opinion should not be the only treatment given.
Noe one for all. That depends on why you cannot focus and are anxious. You need a thorough psychiatric evaluation for a correct diagnosis to be made. Once you know what the problem is and not just the symptoms, you and your doc can put together a treatment plan to get you better.