the term freestyle came around in the 1980's and ment doing stunts on a bmx style bike.
these stunts included ramps and ground riding.
as the "sport" evolved ground riding got more complex (as well as dirt jumping, ramps, street etc)
flatland is doing stunts on flat ground
freestyle can mean doing stunts on anything but usually if it's street you just say street or if it's dirt you just say dirt.