It sounds like you are wanting to know if you can view your computer screen on your TV to use as a monitor. If you have both an Apple TV and a supported iMac you can use the function called AirPlay Mirroring to accomplish this. Here is some information about what it is, and its requirements:
Requirements for AirPlay in OS X
An Apple TV
- Apple TV (2nd generation or later) with software update v5.0 or later.
- AirPlay turned on in the Settings menu of the Apple TV.
A supported MacAirPlay Mirroring in OS X takes advantage of the hardware capabilities of recent Macs to deliver high frame rates while maintaining optimal system performance. The following Mac models support AirPlay Mirroring when using OS X Mountain Lion or later:
- iMac (Mid 2011 or newer)
- Mac mini (Mid 2011 or newer)
- MacBook Air (Mid 2011 or newer)
- MacBook Pro (Early 2011 or newer)
- Mac Pro (Late 2013 or newer)
From: About AirPlay Mirroring in OS X
Thank you for using Apple Support Communities.
All the very best,