Hitting the "Close" button (Red button/X) will close that entire window. In some cases, the application may close if it's the only active window.
Minimize takes the current window and puts it into the dock, and by going down to the dock and clicking that window/icon, the entire window returns in the same state as when it was minimized (identical to how minimize works on Windows).
Think of it like this: You're sitting at a desk and you have a mini whiteboard in your hand. Closing the window is equivalent to erasing everything on the whiteboard; everything that was visible is gone and the only way to get the content back is to redraw it with the marker. Minimizing on the other hand, is like taking the whiteboard and putting it under your desk; The whiteboard is out of view but when you reach down to pick it up again, everything you had on the whiteboard is still there.
Keep in mind though that some applications (like Maps) will close the entire program when you click the X if there is only one open window, but some apps (like Messages) will stay open even if you close all active windows.