A molecule's shape depends on the atoms that make it up and the electrons that belong to the central atom. If the atoms arrange themselves around the central molecule so that they exist on a single two-dimensional plane, the molecule is planar. The molecule may otherwise form any of several three-dimensional shapes, including tetrahedrons, octahedrons or bipyramids. A molecule's shape affects its material's physical properties, such as its color and phase of matter, and determines how it reacts with other molecules.
Count the number of atoms than bond to the molecule's central atom. For example, if you are calculating the shape of sulfur tetrafluoride, note that four fluorine atoms bond to the central sulfur atom.
Count the number of lone pairs of electrons on the central atom. A sulfur atom contains six valence electrons, and four bond with the fluorine atoms. That leaves a single lone pair of electrons.
Check whether the the molecule either has three bonded atoms and a single lone pair, in which case it is trigonal planar, or has four bonded atoms and two lone pairs, in which case it is square planar. Sulfur tetrafluoride has neither of these configurations. It is therefore not planar.
All molecules with fewer than four atoms are technically planar. Yet chemists do not refer to them as such, instead calling them linear or angled depending on their configuration.