Cram was a biscuit-like substance made by the Men of Lake-town and Dale, and shared by them with the Dwarves of Erebor. It was said to be nutritious, and was used as sustenance on long journeys, as for example by Bilbo Baggins and the Dwarves on the last stage of their quest. When Gimli tasted lembas, he remembered cram.
It was made from tightly pressed flour or meal. Basic cram like this was a flavourless, uninspiring food, but sometimes milk or honey would be added to make it a little more palatable.
In The Etymologies, cram is said to be a Noldorin word (the precursor of Sindarin), from a root (KRAB-) meaning "press". It was an "added entry"; Tolkien wrote much of The Etymologies before The Hobbit came out. It is unclear whether this was any more than fancy at the time, as several of these "added entries" were later reenvisioned with a non-Eldarin origin.