Restrict certain material to section of terrain

I want to make a city scene, how would I restrict the grass material so it can only go around the houses or whatever and not spill out into the street?

You can paint it on (or out) with the landscape tools.

How do I do that though?

This may help you:
https://docs.unrealengine.com/latest/INT/Engine/Landscape/QuickStart/4/index.html