We're currently on 4th generation (Haswell). Sandy Bridge and Ivy Bridge are elder 2nd and 3rd generation respectively. They're both on socket 1155, which will no longer recieve further development.
The socket 1150 is currently active. If you're planning to build a new system, build with 4th generation and get a 1150 motherboard; it costs the same as building on the 1155 socket.
Wben purchasing the socket 1150 motherboard, ensure it's 9 series such as H97 or Z97. It doesn't have to be 9 series, but if you do purchase either of the mentioned chipsets, they'll support Devil's Canyon and the upcoming 5th generation Broadwell.
However socket 1150 will be replaced with socket 1151 in 2015/2015. Motherboards usually remain supported by Intel for 2/3 years, until the next tick CPU is released.
Again if you're building now, go with the latest 1150, and with a 9 series motherboard it will be able to support 5th generation processors when they're released.
All the best.