Wordpress, enable or disable extensions (like imagick)

Is there an easy way to enable or add extensions to PHP for my wordpress installation ?
I’m a beginner but know how to connect using SSH.
christian