Take the research project.
As a side actvity, ask your advisor for relevant papers, search on your own for more, those will lead to more references, once you have 20+, read them, skim them again, annotate them, try to organize their findings and how they relate in your mind, come up with an outline, and then try to draft a review paper on the subject, complete with your bibliography of references. Make it decent length, but not too long, say 10-20 double spaced pages. THEN when the paper is written, write an abstract for it, trying to distill everything down.
Surprise your advisor by asking him to look at your review and give you feedback.
To get published you need to write papers. To learn how to write, you need to start reading papers. Start by trying to write a review of the area you are working in. It will organize your thoughts, give you knowledge as you read papers, show your advisor you want to write, and maybe even form the kernel of something later, like the intro to a paper. If you write a first draft of something, it is always easier for your advisor or even a Postdoc in the lab to tear it totally apart than for them to come up with something new, but you need that first draft out there first, so the second one is better, and so on.
Start writing early. Don't try to write in a scientific style, just try to write as clearly as you can.
Learning to deal with harsh reviews is something to learn early too.
You also want some deep knowledge of what you are working on, both so it will be more interesting and motivating, but when you go to interviews you can give more details than just how any mLs you pipetted each day.
Passion for a particular area of research s something you just make, not that is inborn. Dive in fully, keep poking at areas you don't understand until you find something cool that you want to tell peope about. That is what a paper is. You can start trying to do that now.