I would like to know how to convert a pileup file for an adna y chromosome to vcf with Hg19 alignment.
You'll have better luck searching for the term variant calling than with the term converting. A Google search for "variant calling" gives several beginner-level tutorials on the topic. Commonly used tools for variant calling include samtools, GATK, and FreeBayes.
Converting data files from one format to another is a common task in bioinformatics. But that is not the task you want to perform here—the term convert is misleading.
A pileup file contains reads aligned to a reference sequence. A VCF file contains a description of putative or validated genetic variant. The process of creating a VCF from alignments is commonly called variant discovery, variant prediction, or variant calling. This is a broad and active area of research interest in bioinformatics, with many available algorithms and tools, each with a different set of parameters and assumptions.
This forum is not well designed to give you a good introduction to this topic. We are much better equipped to answer specific questions you have about how a particular tool or algorithm works, or why you are observing a particular unexpected result, and so on...assuming you have put in some time to research the question yourself.