What constitutes a greenhouse gas

What constitutes a greenhouse gas? In other words, what do they do that makes them greenhouse gases