Classes

Can someone explain PHP classes to me. I don’t understand how they work. I know that you need to create a class and method inside of them, but I don’t know how to access them and use them. Here is a sample of what I know:


<?php
  class reg {
    public $test = "hello world";
    public function add() {
    }
    public function remove() {
    }
  }
?>