I agree with all the responses so far; however I thought I should add that to publish a paper in a decent internationally peer-reviwed journal, more often than not, a paper has to tell a story, ideally a novel story and not just the same data that has been published before or at least address an old question in a new manner, that provides a fresh insight into the field or the question. A publication can't just be a bunch of random small and unrelated questions and experiments, at least not in any peer-reviewed journal. The key to a successful paper is that it should have ideally one message, which can be identified in the title, since believe it or not thats how most scientists vet whether a paper (abstract/summary) worth looking at or not. So as correctly mentioned, you identify a gap in the knowledge and attempt to address it having considered what is know about it so far, if any. Writing a paper follows a global formula, which has been elaborated in Chris response. Hence the key is that the paper has to tell ideally one story and the experiments used to address it has to make a logical progression to address the question. So you can't just jump from a small preliminary experiment which is questionable in its reliability into a large scale experiment. Some times you have to make the leap of "faith" in your experimentations and just do a certain experiment but the chances are your previous experiments have given you an indication as to whether its going to work or not. Be very mindful that most of the time the order in which you do your experiments is not the order in which you put them in the paper so what usually happens is that you have a central question, you do a bunch of experiments to address it and then you shuffle them around to tell the story in the most concise way and again the key word here is story.
Now not only a paper has to tell a concise story but it has to be of general interest to the scientific community, specially in high impact journals. You probably know a recent paper about STAP cell lines that got into Nature and attracted world-wide attention in which the authors described how exposing the cells to stimulus/stressors such as acid or pressure can turn it pluripotent, which the media linked to personalised treatments. Now I don't want to get into all the controversy that followed it but its just to make the point that a research like this is not only of interest to the scientific community but also the public hence it got published in a highly respectable journal. Now whether thats the right thing for scientists to do and send important research to the top journals, which is hard to access by many countries is a whole different argument but I hope you can begin to see publishing a paper in a journal is not only related to its scientific merits but also to what extent it is of interest to the general or scientific community and what story is it telling or implying (to put it a bit more crudely). Now not every paper makes it to Nature and most of the time publications are highly specialised work which not everyone on the planet might be interested in them but they still follow the points I talked about.
hope this helps!