No. Those are not always interchangeable. For instance, やる means "to feed", "to send a person", whereas する is "to decide/settle". Plus, やる can't be used for stative or abstract things (e.g. sense, emotion), or set phrases like ~にする, ~とする, besides the tone of the two words that staren-san pointed out.
○損をする
×損をやる
○匂いがする
×匂いがやる
○後悔をする
×後悔をやる