On my desk, I have a MacBook Pro with an external Thunderbolt display. I have the two connected so that I can drag windows from my laptop's screen to my external screen. It's really slick. Next to my Thunderbolt display, I have a newer model iMac. While it's nice to have a second Mac for testing, etc right next to me, it would be nice to be able to use that as a third screen for my MacBook Pro on occasion.
Believe it or not, it's not only possibly, but it works great! It's called Target Display Mode and all you need is a Thunderbolt cable to go between the MacBook Pro and iMac. Here's how it works.
First of all, both computers (MacBook Pro and iMac) need to be turned on and connected to each other using a Thunderbolt cable. When you're ready to turn your iMac's screen into an external screen for your MacBook Pro, simply press Command+F2 on the iMac. The screen will flickr very briefly, then turn into another external display for your iMac (with my setup, it would now give me two external displays). You are now free to move windows between all three displays (with your MacBook Pro acting as the primary system).
The iMac is still running as a computer in the background. When you want to switch back to display its screen, press Command+F2 again on the iMac and voila!
Command+F2 acts as a toggle switch between displaying the iMac's screen and the MacBook Pro's screen.
There are some minimum requirements you need to keep in mind for this feature to work. Here they are: