The 52-year-old takes over from Paolo Di Canio who resigned 10 days ago, with this job his first full managerial position, after previous caretaker roles at Premier League sides
The 52-year-old replaces Paolo Di Canio, who resigned 10 days ago, and will meet the players on Friday morning.
He was a coach at Villa for 17 years, and had a short-term role as caretaker boss before becoming Alex McLeish's first-team coach last season.
MacDonald inherits a side currently in fourth place, three points behind league leaders Doncaster Rovers, and chasing promotion for the second successive campaign after making the step up from League Two this season.
Swindon Town chairman Jed McCrory told the club's official website: "This is a hugely important appointment at a significant moment in Swindon's recent history and we are delighted to appoint a football man of Kevin's calibre as our new manager.
"This is a clear message that the new board is determined to drive on for promotion this season and continue to try and bring success to Swindon.
"Kevin has fantastic football credentials as a double-winner with Liverpool during his playing days and he is an excellent coach.
"He has great connections with top players and he is a proper football man. We have every faith for Kevin now to lead Swindon from the front at a pivotal moment in the campaign.
"It is a new start for Kevin and for our new board of directors and we move forward together with every confidence."