If you are a US citizen, I also recommend looking at summer internship postings at US national labs. My impression is that not many people know about them and hence don't apply. (Not to mention they must compete with more lucrative industry internships.)
Also note that as a freshman, you will likely not be writing papers much but moreso learning good research techniques. However, it is common at the end of the summer to present a poster or technical report. (Make sure you discuss this with the professor upfront if that is your goal.) Good luck!
Research papers published in peer-reviewed journals are rarely written by one individual. There generally are collaborators, principal investigators. i.e. co-authors. However, unpublished research papers might be written as part of some course requirement, especially as part of a capstone project. From your question it is unclear as to what level you are contemplating.
Your university likely has an undergraduate research department. Do a quick search and it'll lead you to contact information where you can inquire into the process.
Lately I've been thinking about undergrad thesii and similar, and how tragic it is that so much research has been done but not published! Even just thorough surveys could be invaluable.
Most professors want students to work with them because it’s a mutual relationship: the professor basically gets free labor, and in turn you get your name on papers and future opportunities.