Each of the prepositions (that follows work) constructs a different phrasal verb with a particular meaning.
Taking them in the order you give them:
..to work on... means to be labouring on, occupied with, busy with etc. It is also used in expressions such as to work on site or ....to work on time.
..to work for... can mean either to be employed by (somebody/a company)... or to work in the favour of/to assist. In this sense, none of the tactics that Barcelona tried assisted them/worked in their favour/helped them to succeed.
..to work against ... has the opposite meaning of opposing/hindering a person or enterprise.
..to work to... is used in certain expressions such as to work to rule, meaning to stick to every little rule and not to be flexible. It is also widely used as an infinitive, as in went to work to finish the job.