Medieval swords are classified by a system known as the Oakeshott typology, pioneered by the late sword connoisseur Ewart Oakeshott. The classification system goes as follows, including blade shapes/geometry, handle lengths, hilt parts and styles, as well as era. More in-depth diagrams detailing blade furniture (such as guards and pommels) as well as later period swords can be found, but for purposes of Middle-earth, it is widely accepted that the swords of Tolkien's world fit within the following classification system.
The use of the sword
Contrary to popular belief, eastern cultures were not the only to develop and practice intricate, deadly, and highly evolved fighting methods, particularly in the realm of swordplay. Western Europe, most notably Germany and italy, possessed schools of very complex systems of swordplay which mostly revolved around the use of the longsword, other weapons stemming off of this one basic study. All parts of the weapon are involved, including the guard, pommel, and even the handle itself, not to mention the blade.
These complex studies live on in manuals called "fight books" or Fechtbuch's' in the German schools, which are period documents written by the masters, which can be carefully followed to unravel the secrets of these techniques and practice them for ourselves in a controlled environment. Talhoffer's Fechtbuch, for example, boasts stunningly detailed drawings, such as the following, which shows an attack from above stopped and countered in one motion with a thrust to the neck:
Sword applications within Middle-earth
Rangers are specifically stated to have carried swords. It is not uncommon for a modern day re-creator of Tolkien's world to opt out of carrying one due to weight or weapons laws, but as a general rule, rangers carried swords.
Due to the Dunedain's scattered status, simple blades not requiring large amounts of detail or ornate workmanship are commonly accepted, but a close relationship with the Elves does give rise to the potential for blades crafted in rivendell, etc. The following blade was hand forged from scratch specifically with rangering in mind, by the late Paul Champagne.
Swords can take some getting used to as far as carrying them in the woods...a true longsword in its scabbard will get in the way constantly if you veer off the beaten path, as rangers often do, so it is commonly argued that a more compact arming sword or a hand-and-a-half would suffice. Of course, if the battlefield chosen is an open field or non-forested locale, larger swords could be implemented.
What the books say
The most iconic blade carried by a ranger, of course, would be Anduril, carried by Aragorn. The blade is described fairly well, and a few cross-references give us clues to its size and shape.
" The Company took little gear of war, for their hope was in secrecy not in battle. Aragorn had Anduril but no other weapon [...]. Boromir had a long sword, in fashion like Anduril but of less lineage, and he bore also a shield and his war-horn."
What this tells us is that Anduril was not necessarily a large, two-handed blade as suggested in film representations, but a large arming (one-handed) sword, or a hand-and-a-half that could be wielded in one hand at need. A large two-handed sword is not reasonable to use alongside a shield, as Boromir intended to, so the size of Aragorn's sword can be inferred through this reference. This argument is further bolstered in the Helm's deep portion of The Two Towers, when Aragorn wields a shield gleaned from the armory.