For finding the ObjectId constructor on require('mongoose').Types refer to the following code:
var mongoose = require('mongoose');
var id = mongoose.Types.ObjectId();
The variable id is a newly created ObjectId using mongoose.
If you are a beginner and want to know more about MongoDB then refer to the following MongoDB tutorial which will help you to learn MongoDB from scratch.