A month was usually the amount of time it took for a moon to orbit its planet. This was usually a portion of a year, and a large number of days (in which case it may be broken down into weeks).
On planets without moons, a month could either A) not exist, B) be equal to a season, or C) be a fractional division of a season. For example, Vulcan "has no moon", so it is unknown what portion of a year is represented by the "month" of Tasmeen. The novelization of The Motion Picture could be read to imply that Vulcan's "months" are whole seasons.
On Earth a month was originally the length of the lunar cycle (29.53 days). Most calendars at some point made the month one twelfth of a solar year (30.44 days). In Earth's most common calendar, the months are either 30 or 31 days long, with one shorter month (February) having 28 or 29 days depending on the year.