A box is connected to a TV and setup to the internet via wired Ethernet or WiFi connection. After a box is connected to a TV, and the internet, apps can be installed. … For example Android TV boxes can output HDMI to a TV giving it HD viewing ability. They alsocan use a remote control, keyboard, or mouse for input.
Since the Android Operating System is open source and free, it is much cheaper to manufacture hardware based on it and sold. While it is mainly used on smartphones it can also be installed on small boxes that run the same hardware but give better input and output options.