To enter into the U.S. to marry a U.S. citizen you need a K-1 fiance visa. Your U.S. citizen fiance must file Form I-129F, Petition for Alien Fiance, with the United States Citizenship and Immigration Services (USCIS) Service Center with jurisdiction over their residence. Once the petition is approved, the USCIS will forward the approved petition, through the National Visa Center, to a U.S. embassy or consulate in your home country which will schedule an interview for a fiancé visa.
No, your K-1 status does not automatically change to legal permanent resident after your marriage with your U.S. citizen fiance. you need to file for Adjustment of Status to become a legal permanent resident after you marry your U.S. citizen fiance.