To analyse a text you haven't seen before, begin by carefully reading it through in order to get a sense for what kind of text it is and the main topic(s) it is about. Look for any clues that you are given about who the author is, when the text was written and if the text is an extract, what work it is drawn from. After reading it through once, you can begin thinking about what the purpose of the text is. If it is poetry think about what the poem is trying to achieve: is it trying to convey an emotion; illustrate a state of mind; or describe an aspect of life in an aesthetically pleasing way? Likewise if the text is drawn from a novel: what new information is it conveying to the reader; how is it either advancing the plot or fleshing out the world/characters; why has the author chosen to include this passage in his book?
Thinking in these terms, you can now start annotating the text with your ideas, noting any literary devices and interesting syntax that you encounter. When annotating the text in this way, think carefully about how the author's intentions are being conveyed through his choice of language. Look carefully at the author's choice of vocabulary, why has he/she chosen to use a particular word instead of another? Be on the lookout for changes in length of sentences (or lines in poetry), what effect is being created? Are any literary devices being employed such as alliteration, metaphor or personification, and if they are what is their purpose within the text? Don't forget to constantly link your thinking back to the question as you do this so that your answer remains focussed and your analysis is relevant.