A real tilt-shift lens physically tilts its optical plane relative to the camera body, so the plane of focus itself isn't parallel to the frame anymore. The in-focus area becomes a thin horizontal band, and everything above and below it falls out of focus fast.
Seeing depth of field that shallow makes the brain unconsciously read the scene as "something small, shot up close" — because that's exactly what produces such a shallow depth of field in macro photography. Point the effect down at a real city from above, and full-size buildings and cars suddenly read as a miniature model.
These days it's usually faked in post rather than shot with a real tilt-shift lens: a gradient blur mask over the top and bottom bands, plus a bump in saturation and contrast to sell the "toy plastic" look. On the web, backdrop-filter: blur() on just the top and bottom strips gets you there.
When to use
Use it on a high-angle, looking-down shot of a city or event you want to read as a toy. It barely registers on an eye-level photo.