As Levi points out in comments above, there are many interpretations of who was the wrestler against Yaakov. I want to try and offer an interpretation as to why Yaakov had to struggle and what we can learn from it. This is starting from an idea of the Lubavitcher Rebbe, much of the rest a personal interpretation. It is a bit long, treat it as a dvar Torah if you are interested.
In a nutshell I will argue that Esav/his angel/Amalek/Satan fought with Yaakov to break him, and disconnect the three worlds which Yaakov was connecting: the world of thought, the world of feelings and the world of action. Once Yaakov won the struggle, he became called Yisrael - Yashar El - the "straight of Hashem". By connecting the three, Yaakov is the role model of what a Jew should be - and Esav/Amalek/etc. fought this.
I start with Rashi (on Bereshit 32:25) who brings the midrash (Bereshit Rabba 77:3) and tells us the angel was the angel of Esav. As we know, at the end of the fight, the angel hits Yaakov at the hip and leaves.
In a second encounter between Yaakov and Esav, (Bereshit 33:4), Esav "kisses" Yaakov. Since the word וַׄיִּׄשָּׁׄקֵ֑ׄהׄוּׄ is written in the Torah with six dots, our Sages tell us (Bereshit Rabba 78:12) not to read the word from kiss (lenashek) but from bite (linshokh). The Midrash tells us Esav wanted to bite Yaakov at the neck - but by miracle Yaakov’s neck turned into marble - therefore וַיִּבְכּֽוּ Esav wept as he broke his teeth.
Why did Esav or his angel attack Yaakov and hit him at the neck and at the hip? Why especially at these places, why not in the head and in the stomach?
I find a hint to these elements earlier in the parasha when Yaakov prepared for his encounter with Esav. Rashi (32:9) tells us Yaakov prepared through gifts, prayer and war. Prayer (avoda she balev) from the heart (the world of feelings), gifts from his head (the world of thinking) and war through his legs (the world of action).
This is the way of Yaakov. He feels, he thinks and he acts. Not just that but all three are connected with each other and with Hashem. As the passuk says
וַיֹּאמֶר֮ יַעֲקֹב֒ אֱלֹהֵי֙ אָבִ֣י אַבְרָהָ֔ם וֵאלֹהֵ֖י אָבִ֣י
יִצְחָ֑ק יְהוָ֞ה הָאֹמֵ֣ר אֵלַ֗י שׁ֧וּב לְאַרְצְךָ֛ וּלְמוֹלַדְתְּךָ֖
וְאֵיטִ֥יבָה עִמָּֽךְ׃
Then Jacob said, “O God of my father Abraham and God of my father
Isaac, O LORD, who said to me, ‘Return to your native land and I will
deal bountifully with you’!
Yaakov connects his actions to the mission Hashem gave him. You Hashem asked me to return to my land, the land of Israel. I am now here facing a challenge . So help me, show me the way and I will do three things: with my heart, with my head and with my feet.
Yaakov was an ish yashar - Hashem intentions for man flowed through his mind , his heart and his legs. Maybe for this reason we call Sefer Bereshit - Sefer Hayashar.
What was the new name of Yaakov after these encounters? Yisrael = Yashar El - the one who is straight with God.
Now we understand better why Esav attacked Yaakov in this particular way
- first the angel of Esav hit him at the hip to separate the world of feelings from the world of action
- second Esav’s bit him at the neck to separate the world of thinking from the world of feelings
Whether Esav is Amalek or the the Yetser Hara in all of us (see Kli Yakar Bereishit 32:25), he is trying to disconnect us from our father in Heaven. The one who tells us
- you know enough, there is no need for mitsvot
- you are a good person, you have good intentions, there is no need for mitsvot
- you are doing good already, you know enough, there is no need to learn more
Esav tries to disconnect our thinking from our feelings from our actions.
And Yaakov is showing us what it is to be a "straight Jew". Someone who is connected to Hashem at all times and someone who aligns all his thoughts, feelings and actions with Hashem’s will. Someone who is a channel to bring the will of Hashem into the world.
Why did all of this happen to Yaakov? Why didn’t he fight Avraham or Yitzhak? R Elchonon Wasserman tells us something brilliant. What did Abraham represent? Hesed. Yitzhak? Yira or Tfila. Yaakov? Torah.
That is why the yetezer hara chased Yaakov. It isn’t that Hesed and Tefila aren’t important, but other people have them as well. But it is the Torah which separates us from other nations. It is the Torah, or Halakha, that translates the will of Hashem into the actions of Man. Halakha (from lalekhet, to go) is the world of action/of our feet as a translation from the will of Hashem into the world.
Now how does Yaakov’s story ends (33:18) ?
וַיָּבֹא֩ יַעֲקֹ֨ב שָׁלֵ֜ם
Yaakov came out intact
Intact, that is straight. Yaakov held his way and from this he gave all of us (maase avot siman lebanim) the potential to be like him, to connect our minds, our hearts and our actions to Hashem, do the things which are right as the verse in Dvarim (6:18) tells us
וְעָשִׂ֛יתָ הַיָּשָׁ֥ר וְהַטּ֖וֹב בְּעֵינֵ֣י יְהוָ֑ה
Do what is right (straight) and good in the sight of the LORD