Is Buddhism "opposed" to striving, or working towards a goal that you really want I've found that it is pleasant and exciting to work towards a goal, for example: wanting to run a 21km race, imagining the crowds, imagining the personal accomplishment. This requires a certain amount of dissatisfaction with your current situation (I can only run 5km, I need to train more).

However, what I understand from Buddhism is that this attachment to an end result in the future causes suffering. Does one live with some attachment and accept it, or is it something to be avoided entirely?
In one perspective, buddhism shows something you likely already know: if your goal is not accomplished, and if you created expectations (to win, to see a crowd, to have personal accomplishment, etc), you have invited suffering. And because you don't have full control of the outcome, it's always possible the goal may not be reached.

It also shows that, depending on nuances of the "dissatisfaction with current situation", that dissatisfaction might denote a suffering in and on itself.

But it's quite possible for one to formulate goals without clinging to their outcome -- so that reaching or not the goal is not a source of suffering. And it's possible that the dissatisfaction is not an impediment in one's life, but something useful (e.g. a source of motivation for reaching a goal).


  However, what I understand from Buddhism is that this attachment to an end result in the future causes suffering.


Generally (and ultimately) speaking, any attachment is a source of suffering because it presupposes the object of attachment can be obtained, and if it is obtained, that it is stable and persists through time. Because we can't guarantee we can have what we want, nor we can guarantee what we "have" won't change or be separated from us, craving and attachment are ultimately bogus from the point of view of happiness.


  Does one live with some attachment and accept it, or is it something to be avoided entirely?


Attachment of any kind, from the buddhist point of view, is something to be done away with. But not everyone (buddhist or not) feels the urgency or will to go through the process of doing that. So it's up to you. Generally, the choice to remove an attachment comes from seeing the "bug" in it and develop enough dissatisfaction to do something about it.

So, just like the amount of race training you do is up to you -- ranging from training a few hours per week to full dedication under an olympic training --, the amount of buddhist training is also up to you -- ranging from a a few hours per week to full dedication as a monk.