[verb て-form] + やる
てやる has two uses. It means doing something for someone below you – a child, a younger sibling, a pet – and it declares, roughly, what you are going to do: "I'll show you", "just watch me". Both go on the て-form of the verb.
Between friends it sounds rough, and about anyone above you it is rude. てあげる is the safe choice for a friend; for someone above you, say what you will do in humble form without any "for".
At the end of a sentence about your own next move, てやる is a challenge or a vow, often against someone who has slighted you. It is rough, emphatic speech: arguments, sports, manga.
Both uses belong to casual speech. In polite speech the favour becomes てあげます, or is not mentioned at all; てやります keeps the vow sense: つぎ次はかって勝ってやります.