A piston engine is undersquare or longstroke if its cylinders have a smaller bore (width, diameter) than stroke (length of piston travel). Oversquare is the opposite.
These produce strong torque at low to mid range rpm's because of the "leverage" advantage of a longer stroke. But, undersquare can be a negative trait, since a longer stroke usually means greater friction, a weaker crankshaft and a smaller bore means smaller valves which restricts gaseous exchange; however, modern technology has lessened these problems (explanation?). An undersquare engine usually has a lower redline, but should generate more low-end torque. In addition, a longer stroke engine can have a higher compression ratio with the same octane fuel compared to a similar displacement engine with a much shorter stroke ratio. This also equals better fuel economy and somewhat better emissions. Going undersquare can cause pistons to wear more quickly (greater side-loads on the cylinder walls) and can cause ring seal problems and lubrication problems; with increased loads on the crankshaft, pistons, the piston pins, connecting rods, and rod bearings (due to piston speed). In general, a longer stroke leads to higher thermal efficiency through faster burning and lower overall chamber heat loss. A longer stroke will have greater port velocity at a given RPM, more torque due to more leverage on the crank, will achieve it's greatest efficiency at a lower RPM. Smaller combustion chambers are also more efficient, with the flame front having a shorter distance to travel- this leads to being more detonation resistant, and having an advantage for emissions.
These are generally more reliable, wears less, and can be run at a higher speed. In oversquare engines power does not suffer, but low-end torque does - it being relative to crank throw (distance from the crank center to the crankpin). An oversquare engine cannot have as high a compression ratio as a similar engine with a much higher stroke ratio, and using the same octane fuel. This causes the oversquare engine to have poorer fuel economy, and somewhat poorer exhaust emissions. Breathing is an important advantage for oversquare engines, as the edges of the valves are less obstructed by the cylinder wall (called "unshrouded"). The big bore can fit larger (or more) valves into the head and give them more breathing room.
With shorter crankshaft stroke (and therefore piston travel) parasitic losses are reduced. Ring drag is the major source of internal frictionand the crankshaft assembly also rotates in a smaller arc, so the windage is reduced. Oil-pressure problems caused by windage and oil aeration are lessened.