Then I saw the Lamb open one of the seven seals, and I heard one of the four living creatures call out, as with a voice of thunder, ‘Come!’ I looked, and there was a white horse! Its rider had a bow; a crown was given to him, and he came out conquering and to conquer.
When he opened the second seal, I heard the second living creature call out, ‘Come!’ And out came another horse, bright red; its rider was permitted to take peace from the earth, so that people would slaughter one another; and he was given a great sword.
When he opened the third seal, I heard the third living creature call out, ‘Come!’ I looked, and there was a black horse! Its rider held a pair of scales in his hand, and I heard what seemed to be a voice in the midst of the four living creatures saying, ‘A quart of wheat for a day’s pay, and three quarts of barley for a day’s pay, but do not damage the olive oil and the wine!’
When he opened the fourth seal, I heard the voice of the fourth living creature call out, ‘Come!’ I looked and there was a pale green horse! Its rider’s name was Death, and Hades followed with him; they were given authority over a fourth of the earth, to kill with sword, famine, and pestilence, and by the wild animals of the earth.
The passage was influenced by a handful of texts from the Hebrew bible. The most overt source here is the Book of Zechariah, each passage depicting a set of four horses, each a different color.
In the night I saw a man riding on a red horse! He was standing among the myrtle trees in the glen; and behind him were red, sorrel, and white horses.
And again I looked up and saw four chariots coming out from between two mountains—mountains of bronze. The first chariot had red horses, the second chariot black horses, the third chariot white horses, and the fourth chariot dappled grey horses.
The context of either passage in Zechariah is judgment against Babylon, in retribution for the exile of the Jews from their homeland for 'seventy years'. The revelator has borrowed the symbolism, horses representing judgment, for his own visions.
On the other hand, the Revelation is structured to follow the broad outline of the Book of Ezekiel. Ezekiel 1-3 and Revelation 4-5 each have the prophet view a scene of God on his throne, surrounded by the cherubim. In either scene, God's outstretched hand wields a scroll with writing on its front/outside and back/inside.
Ezekiel states that his scroll contains 'words of lamentation and mourning and woe'. When Ezekiel receives this scroll, he elaborates on its contents over the next several chapters; it is judgment against Judah and Jerusalem because the people have broken their covenant with God. This judgment includes:
One-third of you shall die of pestilence or be consumed by famine among you; one-third shall fall by the sword around you; and one-third I will scatter to every wind and will unsheathe the sword after them. [...] I will send famine and wild animals against you, and they will rob you of your children; pestilence and bloodshed shall pass through you; and I will bring the sword upon you. I, Yahweh, have spoken.
But I will spare some. Some of you shall escape the sword among the nations and be scattered through the countries. [...] Alas for all the vile abominations of the house of Israel! For they shall fall by the sword, by famine, and by pestilence. Those far off shall die of pestilence; those nearby shall fall by the sword; and any who are left and are spared shall die of famine.
Sword, famine, pestilence, and wild animals. These are the same things which the four horsemen in the Revelation symbolize. However, this set of disasters is not unique to Ezekiel and the Revelation; they can be found in a swath of prophetic texts under a variety of contexts. For example:
If you are willing and obedient, you shall eat the good of the land; but if you refuse and rebel, you shall be devoured by the sword; for the mouth of Yahweh has spoken.
Thus says Yahweh: Those destined for pestilence, to pestilence, and those destined for the sword, to the sword; those destined for famine, to famine, and those destined for captivity, to captivity. And I will appoint over them four kinds of destroyers, says Yahweh: the sword to kill, the dogs to drag away, and the birds of the air and the wild animals of the earth to devour and destroy.
And you will hear of wars and rumors of wars; see that you are not alarmed; for this must take place, but the end is not yet. For nation will rise against nation, and kingdom against kingdom, and there will be famines and earthquakes in various places: all this is but the beginning of the birth pangs.
The ultimate source for this pattern may be Leviticus (depending on how early its sources may be). Leviticus 26 describes the penalties for Israel breaking its covenant with God:
If you continue hostile to me, and will not obey me, [...] I will let loose wild animals against you [...] I will bring the sword against you [...] I will send pestilence among you [...] When I break your staff of bread, ten women shall bake your bread in a single oven, and they shall dole out your bread by weight; and though you eat, you shall not be satisfied. [...] And you I will scatter among the nations, and I will unsheathe the sword against you; your land shall be a desolation, and your cities a waste.
Revelation 6 was drawing from a set of typical disasters associated with divine judgment throughout the ancient Israelite tradition. Despite presenting these things through symbolism adapted from the Book of Zechariah, the described disasters are pretty straightforward: the revelator anticipates some nation or kingdom will suffer deaths from war, plague, drought, and wild animal.
The 'wild animals' are exactly that: dangerous, feral animals attacking and killing people.