All the usual caveats with patents apply here: just because Apple has applied for a patent on this technology doesn't mean we'll see it make its way into one of the company's future products. Moreover, it's best to think of a specific patent application as one of the many directions a company can take a particular technology.
With that said, Apple envisions using a combination of haptic motors as well as electrostatic charges to create a keyboard that feels like the real thing. Each "key" would emit its own charge, and that charge would get stronger as you move your finger closer to the edge of the mechanism. What enables the keyboard to feel like a mechanical one is that your fingers would conduct the charges created by the keys. In this way, the keys could attract and repulse your fingers, as well as create the sensation of friction and texture. Together, these features of the keyboard would allow you to touch type on it, according to Apple.
The one factor that makes this patent more plausible than the ones we usually see is that the company is no stranger to removing hardware keys and buttons from its devices. Take the iPhone, for example. Even before Apple removed the home button altogether from the iPhone X, the company replaced the iPhone 7's physical home button with a solid-state one. Still, we're likely years away from more tactile feeling touchscreens and MacBooks without physical keyboards.
Update: This post has been updated to note Apple has applied for, but not yet received, a patent on this technology.