This answer can be found by a very close reading of the text, and through using inference. It is never directly stated what happened to Homer, although there are many, many clues scattered throughout all of the text itself. You have to read in-between the lines, and piece everything together in order to puzzle out the answer.
Take the timeline for instance. Emily meets Homer, they spend a lot of time together, but the townspeople know that he is not the "marrying type," and that he has told people that he prefers the company of men instead of women. So, we can guess from this that Emily likes the guy, but that there is no hope for romance there. Then, she goes out and buys a vanity set that is engraved with his initials, AND she buys rat poison. Homer goes to her house one day, and then is never seen again. Soon thereafter, there is a nasty smell emanating from Emily's house. Put all of these clues together, and we can assume that Homer rejected Emily, and that she killed him with rat poison, and that his rotting body was in the house. Those clues, all put together, lead us to that conclusion.
The ending of the story only confirms those suspicions. The townspeople go into the upper bedroom and find a decayed corpse on the bed. In the room is the engraved vanity set that Emily got for Homer, and next to the body, is a strand of Emily's gray hair on an indented pillow. These clues lead us to believe that she did indeed kill Homer, and then spent time lying next to his corpse on the bed. Kind-of gross, and if you pair it with her previous refusal to let her dead father's body leave the house, it is consistent with her behavior.
Emily was afraid of rejection, and of being alone, and she took that fear to horrifying new heights. It takes a lot of work piecing together clues to figure out what happened to the unfortunate Homer Barron. I hope that helped; good luck!