You will need about a dozen pieces of work for your portfolio. The number varies by school, but most request 10-20 examples of your work. These can be pieces you created for a class or outside of school. You should aim to create more pieces than you need so that when it comes time to create your portfolio, you can choose your strongest pieces to include.
The pieces you include in your portfolio should also have been created fairly recently. Most schools request that your submissions be work you recently completed, and some require the pieces to have been completed within the past year or past few years. Hopefully, your most recent work will be your best anyway, since you have been learning more and improving.