I guess you followed all steps on github.com/Valloric/YouCompleteMe to install YouCompleteMe, so I'm going to skip that part.
Now to get it to work, you'll need a Plugin manager for
vim, see the full installation guide on the same site.
Note I'm going to use vundle here as plugin manager, but the same works with pathogen and vim-plug, see their respective
README for details.
To install vundle, get it from github (I recommend using the default directories)
$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
and put this at the top of your .vimrc (create a file
~/.vimrc if you don't have one already) to install plugins (example from their site)
" set the runtime path to include Vundle and initialize
" alternatively, pass a path where Vundle should install plugins
" let Vundle manage Vundle, required
" YouCompleteMe Plugin
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" Put your non-Plugin stuff after this line
Then, to install the plugins, launch vim and run
:PluginInstall, or use
$ vim +PluginInstall +qall
to install plugins from command line.
Check out the instructions in the repo for more details, e.g. on how to update or remove plugins and so on.