Like the opening of most Shakespearean plays, Act I scene 1 serves to establish the background situation and mood of the story. In this play, scene one is out on the grounds of the castle of Elsinore. The characters on the stage are all minor characters who through their conversation establish that there has been a ghost seen two times now that looks like the former king, King Hamlet. The guards question the veracity of what they see, so they have enlisted Horatio, a scholar and friend of Hamlet's, to come are confirm the vision.
Through the course of the conversation Shakespeare uses several literary devices. Here are a few examples:
Horatio claims that the the ghost "bodes some strange eruption to our state." This visual imagery of the literal ground erupting with the dead body of the ghost coming from the grave is very creative and vivid. This is also metaphorical because a state or country cannot literary "erupt" like a volcano might, but it can be unsettled politically and have the potential to face a terrible circumstance.
Marcellus asks why "the night is joint-laborer with the day." This metaphor explains how there is little difference between night in day (they work together). In this case, he is referring to the fact that the preparations for war are a 24 hour operation.
Horatio reports that Fortinbras has "in the skirts of Norway" gathered up some soldiers. Norway's skirts is a metaphor for its outer edges, not its major cities.
He goes on to say that Fortinbras has "sharked up a list of lawless resolutes." To shark up is a metaphor to suggest that he has indiscriminately gathered in (like a shark open-mouthed and capturing prey) a group of men to serve as a mercenary army.
Horatio makes an allusion to the assassination of Julius Caesar when he compares this ghost to the omens that were the precursors to the Ides of March. He says this situation is like the "palmy state of Rome."
In the end of the scene, Horatio uses personification when he describes the coming dawn by saying that "the morn, in russet mantle clad / Walks o'er the dew of yon high eastern hill." Clearly, morning doesn't wear a coat or walk, but he is using personification to describe the color and action of the rising sun at dawn.