Cygwin is a Linux-like environment for Windows. It is something like a Linux simulator, but actually it is NOT. Cygwin is not a way to run native linux apps on Windows. You have to rebuild your application from source if you want it to run on Windows. Cygwin is not a way to magically make native Windows apps aware of UNIX ® functionality, like signals, ptys, etc. Again, you need to build your apps from source if you want to take advantage of Cygwin functionality.
Because it is simple to use and you don’t need to install a real Linux on your computer, it is widely used for Windows user. The most common situation to use Cygwin is when you want to use g++ in Windows.
When you install Cygwin, you may see the following figure. You can choose whatever packages you like if you know their functions. You may expand the category to find what you need. If you want to install g++ and other related components such as gdb and make, you may see the post here.
To be mentioned, although Cygwin contains most of commands in Linux, there will be some missing. For example diff is not included by default. You may find it in the Utils category, and it is diffutils: A GNU collection of diff utilities. See the figure below.