a layer 2 switch is the switch you probably learned about if you have done anything with networking, it remembers where IP's are located on the network and transfers data to the known IP without broadcasting, thus helping keep down network congestion. A layer 3 switch is closer to being a router, but it isn't exactly one so you can't use it that way. It still does all the things the layer 2 switch does. It's more expensive but can offer better security because it works at the network level instead of just the data link level. As far as what's good for what, it is easier to say what your application is and us go from there. If this is a home network or small business, a switch in general is more than necessary. If you're setting up a network for a large company (hopefully not and asking us questions like these) then the layer 3 would be beneficial.