Ang magsasaka ay isang taong nagmamay-ari, nagpapatakbo o namamahala sa isang sakahan, na isang lupang pang-agrikultura na ginagamit para sa produksyon ng mga pananim, alagang hayop, o iba pang produktong pang-agrikultura. Ang mga magsasaka ay kasangkot sa iba't ibang aktibidad na may kaugnayan sa pagsasaka, tulad ng pagtatanim, pag-aani, pag-aalaga at pagpapakain ng mga hayop, pagpapatakbo ng mga makinarya at kagamitan, pagpapanatili ng imprastraktura ng sakahan, at pagbebenta ng kanilang mga produkto. Madalas silang responsable sa paggawa ng mga desisyon na may kaugnayan sa pag-ikot ng pananim, pamamahala ng lupa, patubig, pagkontrol sa peste, at iba pang aspeto ng pagsasaka upang mapakinabangan ang ani at kakayahang kumita. May mahalagang papel ang mga magsasaka sa pandaigdigang supply chain ng pagkain at sa pagpapanatili ng mga ekonomiya sa kanayunan.