I can not understand is this picture 2D or 3D .what is the rule or condition to be a 2D or 3D picture.How can I understand that?please help me?
This is a subtle question! In a certain sense, the picture is two-dimensional, since it's displayed on a computer screen. :) That's a trivially literal remark, yet not without mathematical content.
A closely related question is, "Does there exist a physical object that looks like the picture from some direction?" Perhaps surprisingly, the answer is "yes". A web search for "Penrose triangle sculpture" locates a number of additional photographs.
Roger Penrose wrote a beautiful three-page article, On the Cohomology of Impossible Figures (behind a paywall, unfortunately), that addresses the difference between a two-dimensional picture being "locally consistent" (here, each corner of the triangle has a standard, physically-plausible interpretation as a plane projection of an actual object) and "globally consistent" (the entire picture has a standard, physically-plausible interpretation as a projection of an object).
The Penrose triangle is not globally consistent in this sense; physical sculptures may consist of three straight bars not forming a spatial triangle, or may have curved sides that appear straight from some direction, but a closed triangle made of straight sides having square cross section and meeting spatially "as they appear to" is impossible.
Incidentally, Penrose's paper is as concrete and elementary an introduction to the potentially forbidding topic of Čech cohomology as one is likely to find. Even a mathematically-curious high school student should be able to appreciate its general ideas.