@shibao If you get bored, or anxious, or suddenly remember there is something you absolutely must do, note that those are merely thoughts arising. Let them gently go and return to focusing on your breath.
If you're convinced that you are doing it wrong, or that this is useless, or that you're stupid and never understand these things, note that these too are merely thoughts arising. Allow for the possibility that they aren't true, gently let them go, and return to focusing on your breath.
If you find that your thoughts just won't stop swirling and you can't stop thinking, relax. This is a fundamental part of the human condition, and a big part of mediation is about realizing that. Gently let those thoughts go, and return to focusing on the breath.