A program is composed of a set of related projects. For example, a program led by a nonprofit to provide clean drinking water in a rural area might comprise an infrastructure project, a research project, and an education or PR project.
Put simply, a program is often the driving and managerial force behind a set of projects. Not every project needs to be part of a program, but if it is, the success of a project is also considered on a program level—did it help achieve the overall program goals?
A portfolio is concerned with the organizational strategy and how it affects the business itself. Goals set at the portfolio level will give shape to different projects, programs, and operational activities.
Of course, the interpretation of these titles depends on the organization. For example, there’s program portfolio management, which assess programs from a portfolio level.