Few PhD candidates will get an academic position without having published at least one article. Most first articles stem from your PhD research, but on occasion they can come from a research paper you wrote for a grad seminar on which you received an A; your teacher will usually tell you if s/he thinks it is worthy of revising for publication.
Participating in a Scholarly Conference
Graduate students, particularly PhD students, are encouraged to give papers at scholarly conferences in order to gain feedback on their research, network with other scholars, and build their CVs. Your teachers will often tell you if they think a paper you wrote for their class (particularly the Proseminar/Seminar sequence) has the potential to be developed into a conference paper, or you can seek out their opinion.