You go to your project and through the angular cli you do a npm install -s @ angular / material @ angular / cdk.
Then you have to import the material angular module that you want to occupy, for example if you want to work with the buttons in the app.module you write.
import {MatButtonModule} from '@ angular / material / button';
And you put it in your imports.
Remember that some modules of material require to have installed the animations so it also installs the animations
npm install --save @ angular / animations
And in the app module it imports the browserAnimationsModule.
For more information visit the documentation there comes all very well explained link
Greetings.