I have been hearing about them for a long time but have never understood exactly what they do. Is it basically like an android phone connected to a tv via hdmi? Or does it have a different layout? Can someone explain this and also what some good affordable android boxes would be?
AndroidTV is made by Google and is a specific variant of the Android operating system. It's only allowed to be installed on certified hardware. The benefit is that you get and interface that works with a remote control. Also, certified apps also have a remote control based interface.
An Android box has regular Android in it with an HDMI out. You can use it with a mouse, touchscreen, or try to find a remote control interface. The apps have regular touchscreen based interfaces on them.