Fishtail shape in the magnetic hysteresis loop for superconductors: Interplay between different pinning mechanisms