Proper use of mysqli->close();
The fact that mysqli has nothing to do with PDO aside, there are several things about your code at whole:


this "class Database"  from some article is a dummy. It is absolutely useless and there is not a single reason to prefer it over original PDO. Let alone some flaws in the code inside.
under no circumstances you should create a new database connection in the constructors of your classes. A single existing instance should be passed as a constructor parameter instead.
runQuery() function is misplaced, misnamed and useless. It just performs PDO::prepare() which you can always call directly. It makes whole User class a dummy as well, just a useless chunk of code.
some User-related method should be written in this class instead


Given all the above let's rewrite your code

database.config.php will be a code from my article How to connect to MySQL using PDO:

&lt;?php
$host = '127.0.0.1';
$db   = 'test';
$user = 'root';
$pass = '';
$charset = 'utf8mb4';

$options = [
    \PDO::ATTR_ERRMODE            =&gt; \PDO::ERRMODE_EXCEPTION,
    \PDO::ATTR_DEFAULT_FETCH_MODE =&gt; \PDO::FETCH_ASSOC,
    \PDO::ATTR_EMULATE_PREPARES   =&gt; false,
];
$dsn = "mysql:host=$host;dbname=$db;charset=$charset";
try {
     $pdo = new PDO($dsn, $user, $pass, $options);
} catch (\PDOException $e) {
     throw new \PDOException($e-&gt;getMessage(), (int)$e-&gt;getCode());
}


here it will give you an instance of PDO class.

user.class.php

&lt;?php
class User
{   
    private $conn;

    public function __construct(PDO $pdo)
    {
        $this-&gt;conn = $pdo;
    }
    public function findTeacher($id)
    {
        $stmt = $this-&gt;conn-&gt;prepare("SELECT * FROM teacher WHERE id=?");
        $stmt-&gt;execute([$id]);
        return $stmt-&gt;fetch();
    }
}


here you have a findTeacher() method logically placed in the user class.

index.php

&lt;?php
require_once 'database.config.php';
require_once 'user.class.php'; 

$user = new User($pdo);
$teacher = $user-&gt;findTeacher($_SESSION['teacher_id']);
echo $teacher['Name'];


As you can see, this code is much more concise and logical, actually utilizing some basic OOP, as opposed to your current code which could be written (again more concisely) without any classes.

As for your question, in the average PHP script you don't have to close neither the statement nor the connection. PHP will close it for you automatically.