I'm not sure what stage of the game you are in and what exactly you are asking, but here goes. I assume that your dead-end job involve working in a lab. First, the person who writes a paper is the one who does the majority of the work (coming up with ideas and doing experiments). Often, for undergrad. students, PIs will give you an idea and tell you (or ask) what experiments to do, but you still write the paper. If you do experiments that are in the paper, your name should be on the paper, even though you don't write it. It is difficult to learn how to write a paper without actually doing it, but if your name is on a paper, involve yourself in the proofreading/editing process.
To be in the position to write a paper, you often need to volunteer in a lab or work as a technician and let the PI know that you want to write a paper. You have to be relatively aggressive and tell the PI what you want to do and ask what the best way is to accomplish this. You also have to be relatively knowledgeable about the subject you want to write about. You can usually read relevant reviews and papers while learning how to do experiments.
For my first paper, I found a lab that was doing work that was interesting to me (this is key), then emailed the PI, set up an appointment, and told him I wanted to do research in his lab (volunteer in spare time). He set me up with various people to learn techniques, then gave me a very well-defined project. I would meet with him frequently and he we would discuss my data and what experiments to do next. Then, he helped me write it up. You just have to approach people and tell them what you want.