I recently had to compile a publication list with citation counts for a grant proposal, and I was shocked when inspire informed me I have 67 papers, most of which got indeed published at some point. I'm getting old, but I'm still not wise, so to cheer me up I've decided at least I'm now qualified to give you some advice on how to do it.
First advice is to take it seriously. Science isn't science unless you communicate your results to other people. You don't just write papers because you need some items on your publication list or your project report, but to tell your colleagues what you have been doing and what are the results. You will have to convince them to spend some time of their life trying to retrace your thoughts, and you should make this as pleasant for them as possible.
Second advice: When in doubt, ask Google. There are many great advice pages online, for example this site from Writing@CSU explains the most common paper structure and what each section should contain. The Nature Education covers the same, but also gives some advice if English is not your native language. Inside Higher ED has some general advice on how to organize your writing projects.
I'll not even try to compete with these advice pages, I just want to add some things I've learned, some of which are specific to theoretical physics.
If you are a student, it is highly unlikely that you will write your first paper alone. Most likely you will write it together with your supervisor and possibly some other people. This is how most of us learn writing papers. Especially the structure and the general writing style is often handed down rather than created from scratch. Still, when the time comes to do it all on your own, questions crop up that previously didn't even occur to you.
Before you start writing
Ask yourself who is your intended audience. Are you writing to a small and very specialized community, or do you want your paper to be accessible to as many people as possible? Trying to increase your intended audience is not always a good idea, because the more people you want to make the paper accessible to, the more you will have to explain, which is annoying for the specialists.
The audience for which your paper is interesting depends greatly on the content. I would suggest that you think about what previous knowledge you assume the reader brings, and what not. Once you've picked a level, stick with it. Do not try to mix a popular science description with a technical elaboration. If you want to do both, better do this separately.
Then, find a good order in which to present your work. This isn't necessarily always the order in which you did it. I have an unfortunate habit of guessing solutions and only later justify these guesses, but I try to avoid doing this in my papers.
The title should tell the reader what the paper is about. Avoid phrases like "Some thoughts on" or "Selected topics in," these just tell the reader that not even you know what the paper is about. Never use abbreviations in the title, unless you are referring to an acronym of, say, an experiment or a code. Yes, just spell it out. If you don't see why, google that abbreviation. You will almost certainly find that it may mean five different things. Websearch is word-based, so be specific. Exceptions exist of course. AdS/CFT for example is so specific, you can use it without worries.Keep in mind that you want to make this as easy for your readers as possible, so don't be cryptic when it's unnecessary.
There is some culture in theoretical physics to come up with witty titles (see my stupid title list), but if you're still working on being taken seriously I recommend to stay clear of "witty" and instead go for "interesting".
The abstract is your major selling point and the most difficult part of the paper. This is always the last part of the paper that I write. The abstract should explain which question you have addressed, why that is interesting, and what you have found, without going much into detail. Do not introduce new terminology or parameters in the abstract. Do not use citations in the abstract and do not use abbreviations. Instead, do make sure the most important keywords appear. Otherwise nobody will read your paper.
Time to decide which scientific writing style you find least awkward. Is it referring to yourself as "we" or "one"? I don't mind reading papers in the first person singular, but this arguably isn't presently the standard. If you're not senior enough to be comfortable with sticking out, I suggest you go with "we". It's easier than "one" and almost everybody does it.
PACS, MSC, Keywords
Almost all journals ask for a PACS or MSC classification and for keywords, so you might as well look them up when you're writing the paper. Be careful with the keywords. Do not tag your paper as what you wish it was, but as what it really is, otherwise you will annoy your readership, not to mention your referees who will be chosen based on your tagging. I frequently get papers submitted as "phenomenology" that have no phenomenology in them whatsoever. In some cases it has been pretty obvious that the authors didn't even know what the word means.
The introduction is the place to put your work into context and to explain your motivation for doing the work. Do not abuse the introduction to write a review of the field and do not oversell what you are doing, keep this for the grant proposals. If there is a review, refer to the review. If not, list the works most relevant to understand your paper. Do not attempt to list all work on the subject, unless it's a really small research area. Keep in mind what I told you about your audience. They weren't looking for a review.
Yes, this is the place to cite all your friends and your own papers, but be smart about it and don't overdo it, it doesn't look good. Excessive self-cites are a hallmark of crackpottery and desperation. They can also be removed from your citation count with one click. The introduction often ends with a layout of the sections to come and notations or abbreviations used.
Try to avoid reusing introductions from yourself, and certainly from other people. It doesn't look good if your paper gets marked as having a text overlap with some other paper. If it's just too tempting, I suggest you read whatever introduction you like, then put it away, and rewrite the text roughly as you recall it. Do not try to copy the text and rearrange the sentences, it doesn't work.
Methods, Technics, Background
The place to explain what you're working with, and to remind the reader of the relevant equations. Make sure to introduce all parameters and variables. Never refer to an equation only by name if you can write it down. Make this easy for your readers and don't expect them to go elsewhere to convert mentioned equation into your notation.
If your paper is heavy on equations, you will probably find yourself repeating phrases like "then we find", "so we get", "now we obtain", etc. Don't worry, nobody expects you to be lyrical here. In fact, I find myself often not even noticing these phrases anymore.
Will probably contain your central analysis, whether analytical or numerical. If possible, try to include some simplified cases and discuss limits of your calculation, because this can greatly enhance the accessibility. If you have very long calculations that are not particularly insightful and that you do not need in other places, consider exporting them into an appendix or supplementary material (expansions of special functions and so on).
I find it helpful if the results are separate from the main part because then it's easier at first reading to skip the details. But sometimes this doesn't make sense because the results are basically a single number, or you have lead a proof and the main part is the result. So don't worry if you don't have a separate section for this. However, if the results of your study need much space to be represented, then this is the place to do it.
Be careful to compare your results to other results in the fields. The reader wants to know what is new about your work, or what is different, or what is better. Do you confirm earlier results? Do you improve them? Is your result in disagreement with other findings? If not, how is it different?
In most papers the discussion is a fluff part where the author can offer their interpretation of the results and tell the reader all that still has to be done. I also often use it to explicitly summarize all assumptions that I have made along the way, because that helps putting the results into context. You can also dump there all the friendly colleagues who will write to you after submission to "draw your attention to" some great work of theirs that you unfortunately seemed to have missed. Just add their reference with a sentence in the discussion and everybody is happy.
Repeat the most relevant part of the results, emphasize especially what is new. Write the conclusion so that it is possible to understand without having read the rest of the paper. Do not mash up the conclusion with the discussion, because you will lose those readers who are too impatient to make it through your interpretations to get to the main point.
Give credit where credit is due. You might have first read about some topic in a fairly recent paper, but you should try to find the original source and cite that too. Reference lists are very political. If this is one of your first papers in the field, I recommend you ask somebody who knows "the usual suspects" if you have forgotten somebody important. If you forget to cite many relevant references you will look like you don't know the subject very well, regardless of how many textbooks or review articles you have read.
If you cite online resources, you should include the date at which you have last accessed the reference to your quotation.
Keep your reference lists in good order, it's time well spent. You will probably be able to reuse them many times.
Include figures when they are useful, not just because you have them. Figures should always contain axis labels, and if you are using dimensionful units, they should include the units. Explain in the figure caption what's shown in the image; explain it as if the reader has not read the text. It's okay if it's repetitive.
If anyhow possible avoid figures that can only be understood when printed in color. Use different line styles or widths in addition to different colors. Be very careful with 3d plots. They are often more confusing than illuminating. Try to break them down into a set of 2d plots if you can.
Try to use notation that is close to that of the existing literature, it will make it vastly easier for people to understand your paper. Make sure you don't accidentally change notation throughout your calculations. If your equations get very long, try to condense them by breaking up expressions, or by introducing dimensionless variables, which can declutter expressions considerably.
SPELLCHECK (with caution)
I find it stunning that I still see papers full of avoidable typographical errors when one can spell check text online for free. Yes, I know it's cumbersome with the LaTeX code between the paragraphs, but if you're not spell checking your paper you're basically telling your reader you didn't think they're worth the time. Be careful though and don't let the cosmic ray become a comic ray.
... and sooner than you know you'll have dozens of publications to look back at!