In short if a material shows certain properties in 2 dimensions ( say x and y but not z) or on the length scale the 2 dimensions are much larger compared to the 3rd one, we call them as 2D material.
Generally it's the physical dimensions only like graphene. But some researchers also include in it other materials which possess certain properties in 2 dimensions but not on third dimension like good electrical conductivity along 2 dimension but insulator along 3rd.
Often times the 2D distinction is made based on the strength of the inter-atomic bonds. In that sense, 2D materials are those having weak bonds along one direction while having stronger bonds otherwise. This is regardless of the physical size of the material (it can be bulk).