I am new to SharePoint.
I am confused on whether to use WebParts or custom.aspx page for custom development. Which is the better option out of the two? And why?
Also, what are the merits and demerits of both?
If by custom .aspx page you mean Application page than obvious difference is that application page will have URL like http://sharepointsite/_layouts/YourSolution/ApplicationPage.aspx. And these application pages are shared between different Web Applications (not specific to a Web Application).
On the other side you can built reusable Web Parts and use it for more than one tasks / more than one page. You can drop Web Parts on any Publishing / Web Part page.
I personally feel Web Part development to be more flexible given that you can connect multiple Web Parts and define custom Web Part properties.