If you want to produce exactly the SQL above using Eloquent:
Comment::query()
->where('active', true)
->join('posts', fn($join) => $join->on('posts.id', '=', 'comments.post_id')->where('posts.active', true))
->join('users', fn($join) => $join->on('users.id', '=', 'posts.user_id')->where('users.active', true))
->get();
Eloquent has a whereHas (or more recent whereRelation) methods to constraint a query across relations. However, the queries produced are not going to be JOINs, and will likely be less performant than the example above; e.g.
Comment::query()
->whereRelation('post', 'active', true)
->whereRelation('post.user', 'active', true)
->get();