Any Jew, not necessarily a kohen or levi, can slaughter an animal, with few exceptions (Chullin 1:1):
הַכֹּל שׁוֹחֲטִין וּשְׁחִיטָתָן כְּשֵׁרָה, חוּץ מֵחֵרֵשׁ, שׁוֹטֶה, וְקָטָן, שֶׁמָּא יְקַלְקְלוּ בִשְׁחִיטָתָן
Anyone [may] slaughter - and his slaughter is valid - except for a deaf-mute, a shoteh [a person who exhibits signs demonstrating a lack of ability to think clearly], or a minor, lest they spoil the slaughter.
This is said about non-consecrated animals slaughtered to be eaten, but it is even the case for sacrificial animals (Zevachim 3:1):
כָּל הַפְּסוּלִין שֶׁשָּׁחֲטוּ, שְׁחִיטָתָן כְּשֵׁרָה. שֶׁהַשְּׁחִיטָה כְשֵׁרָה בְּזָרִים, בְּנָשִׁים, וּבַעֲבָדִים, וּבִטְמֵאִים
If people who are ineligible [to serve in the Temple] slaughtered [an offering], their slaughtering is valid, since slaughtering is valid if performed by non-priests, by women, by slaves, and by impure individuals.