Hörni can mean a few different things, but put simply, it's a way of getting the attention of a group of people.
Hörni comes from the verb höra (to hear/listen) and the pronoun ni (plural 'you') so it literally means something like 'listen up, you!' but the meaning is closer to 'guys' or 'hey!'. It can be spelled with either one 'r' or two: hörni or hörrni.
You're most likely to hear it when one person is trying to get the attention of several others: perhaps a teacher in Swedish class ready to announce the next task, or when you're trying to get several people to pause their individual conversations to listen to you: hörni, jag måste gå! (right guys, I've got to go), hörni, jag måste berätta nånting för er (guys, I have to tell you something), hörni, vad sägs om en fika? (hey guys, what about a fika?)
Hörni can be used on its own or this way, or you can follow it by a plural noun to be more specific about who your greeting is addressed to: hörni tjejer (hey girls), hörni allihopa (hey everyone), and so on.
And you can also use it after a greeting, such as: tack för allt, hörni (thanks for everything, guys), glad midsommar, hörni (Happy Midsummer, everyone/guys), jag älskar er, hörni (I love you guys) or ja hörni (literally 'yes guys', but because the hörni is emphatic, the meaning is usually more like 'that's right, guys').
Swedish also has the similar word hörrdu, which usually becomes hörru in speech and is used when speaking to only one person, for example hörru, Nils (hey, Nils).
Hörni and hörrdu are features of informal, spoken Swedish. That doesn't mean you won't encounter them in written Swedish too, but in that case it tells you that the writer wants to make the tone more conversational.
Hörni, hörni, kan vi sluta nu
Guys, guys, can we stop now
Hörni, jag behöver er hjälp!
Guys, I need your help!