Accretion of matter onto a central object and bipolar ejection of collimated plasma from the inner regions of the accretion disc are very common phenomena in Astrophysics. Jets with different spatial scales (galactic and extragalactic) and speeds (relativistic and non relativistic) are sources of non-thermal emission produced by high-energy particles accelerated in situ. I will discuss our recent results on particle acceleration in shocks in extragalactic and galactic jets. In the former case, we conclude that acceleration in the mildly relativistic shocks in the jet lobes in radiogalaxies can accelerate Ultra High Energy Cosmic Rays. In the later case, we show that protostellar jets can accelerate TeV electrons and protons and emit gamma rays.