Depending on your device there will be different considerations.
iPhone & iPad Wireless Display over Apple TV
This page has a great write up you can use: http://iphonphone.blogspot.com/2014/05/airplay-mirroring-how-to-use-it-in-ios.html
Keep in mind that AirPlay can require a strong wireless signal or else the playback can be choppy.
iPhone & iPad Wired Display over HDMI
For the best possible video signal consider using an HDMI cable between the device and the television. You'll need a 30 pin to HDMI adapter or Lightning to HDMI adapter, depending on your iOS device model. These adapters are about $40 each. Long HDMI cables can be purchased inexpensively at monoprice.com - for example here is a 15 foot cable for under 7 dollars. Different colors, lengths and speed ratings are available there.
iPad Aspect Ratio Considerations
Because iPads display at a 4:3 aspect ratio, when mirroring to a 16:9 television there will be black bars on the side of the picture. This can be mitigated by using the televisions zoom feature.
Android Devices with Cast
Android devices can now mirror their screen to a chromecast as well as an increasing number of smart devices that support the Google Cast standard
Chromecast instructions are here: https://support.google.com/chromecast/answer/6059461?hl=en
Roku Instructions are here: https://support.roku.com/hc/en-us/articles/208754928-Screen-Mirroring-overview
In addition, many smart TVs are coming with Cast support, so it is worth looking up your model or just seeing if you notice the TV when you scan for available cast points.
Android Devices with Miracast
Each android device is a little different, but many (especially Samsung devices) have support for screen mirroring via miracast. To use this feature you do need to purchase a miracast receiver. We don't have an official recommendation for one yet, but suggest you buy one of the higher rated ones available on Amazon.com here
Android Devices with Micro HDMI
A few Android devices have Micro HDMI ports, and these cables can be found on monoprice.com inexpensively.
Android Devices with MHL HDMI
Many more Android devices allow you to split a HDMI connection out of the micro USB charging port. Selecting the correct MHL adapter can be tricky, so we only suggest purchasing official adapters from your manufacturer which say they support your exact device.
Here is an example MHL 2.0 adapter for modern Samsung devices.
Kindle Fire Device
Kindle Fire devices can wirelessly screen mirror to Kindle Fire TV and Fire TV Stick products. Instructions from Amazon can be found here.
Please note that at time of writing Chromecast support is was possible on Kindle devices. We have not tested Fire OS 5 yet though.