Why some papers are free, while others aren't, in the same publication
You can see that one of the papers was published under an open access Creative Commons license (hence freely available to everyone), and the other wasn't. So-called hybrid open-access journals have a system where some of the articles are published under open access conditions, usually in exchange for a publication fee. This appears to be the case for the journal in question. Probably the author paid to have it published as such, possibly mandated by their institution or funding agency, or possibly because they want to support open access.
How to tell if your university has access to a given subscription journal
Usually this is stated quite clearly on the university library website, when looking up specific journals. If the specific journal isn't listed, the university doesn't have access. Even when listed as having online access, there may be restrictions, e.g. online access may only be available for a certain time period, say 1983-2001. This is usually listed quite clearly.
One thing that usually isn't stated clearly, is that you might not have working automatic access, and may need to access the journal through the university website. If that website doesn't clarify things, or you still have problems, I would recommend asking a university librarian. Even if your university doesn't have access to the journal in question, they are often able to source a copy of the article through e.g. an inter-library loan.