Strange icon next to the dock
This is called "Handoff" and is a feature that Apple introduced with OS X Yosemite and iOS. It is designed to allow you to quickly switch from your Mac to your iOS device but can also work between different Macs. 

In this case, it would allow you to switch over to the exact environment that is running on the other Mac. This could be useful if one was working on an iMac, and then picked up their MacBook Air to continue their efforts on a Pages document, for example. Obviously the functionality extends to a number of programs. 

To disable, open System Preferences and click General. Uncheck the "Allow Handoff between this Mac and your iCloud Devices" option. 

For more information: https://support.apple.com/kb/PH18754?locale=en_US