Dear Student,
Whether an acid is an oxidising or reducing agent depends upon the oxidation number of the central metal of the acid. If it is in higher oxidation sate, then it will act as a oxidising agent and if it is in lowest oxidation state, then as an reducing agent.
For eg. in H2SO4, oxidation state of S is +6 which is its higher oxidation state. So now it cannot lose more electrons and just gains them. So, it makes the other compound lose electrons i.e. oxidise the other compound and itself gets reduced i.e. it acts as an oxidising agent.