Step 1) Edit your page, select the Web Part option from the Insert tab in the ribbon, then select the Script Editor Web Part:
Select Add to insert the Web Part onto your page.
Notice that as soon as you place your code snippet into the box, it will show you a preview in the lower left corner. Select Insert when you are finished, then save your page.
You’ll need to be sure that you have a Custom List created ahead of time to link to. Also be sure to set the Chrome Type to None in the Web Part settings to remove the title and border.
From there, click on the ‘Leave a Comment’ button and your NewForm.aspx page will open up in a modal dialog:
You can of course always add some pretty styling to make it look much nicer. You can accomplish this with the Script Editor Web Part as well to add CSS inside of <style> tags. This is probably the best option if you are only wanting to make styling changes to a single element on your page.