Kodi formerly know as XBMC (Xbox Media Center) which was later Microsoft refuse them to use the name. It was all started from the first generation Xbox. It was supposed to incorporated into Xbox and watch Movies from there.
Today Kodi has come along way and many platform uses it, Windows, iOS, Android, Linux, Raspberry Pi and others.
Depending on your platform you can find the download HERE.
Is Kodi legal? Yes it is, otherwise it will be blacklisted in Google Play Store. The only thing is not legal are the Repositories Add-on. You can find the Banned list HERE.
However you will need this Repo to get it running which are run by many 3rd Parties around the world. With these Add-on one will be able to watch Movies, TV Shows, Sport Channel, Live TV all around the world. I will keep it simple for beginner so these are the post installment to follow up
KODI Tutorial #1 Introduction
KODI Tutorial #2 Installation Android
KODI Tutorial #3 Installation Raspberry Openelec Simple Setup
KODI Tutorial #4 Repo Add-on Exdous
KODI Tutorial #5 IMDB Watchlists
KODI Tutorial #6 Trakt Sync
KODI Tutorial #7 Kore Android Remote Control
KODI Tutorial #8 Chromcast to TV