Jared Weinstein and I wrote a paper on how to compute $\pi_p$: see here.
As Olivier says, $a_p$ will often be zero, and in fact if the central character is trivial (or has conductor coprime to $p$) this is always the case when $p^2$ divides the level of $f$. One can get a bit futher by twisting: you can always twist a newform by Dirichlet characters, and Atkin and Li have shown that $\pi_p$ is principal series or Steinberg at $p$ if and only if there is some Dirichlet character $\chi$ such that the twist of $f$ by $\chi$ is a newform with nonzero Fourier coefficient at $p$ (or an oldform attached to such a newform).
So that leaves the supercuspidal cases, and here Hecke theory won't help you at all: no matter how you twist your form, the Hecke eigenvalues are all zero. One can actually show (the "local converse theorem") that $\pi_p$ is uniquely determined by the Atkin-Lehner pseudo-eigenvalues of all of the twists of $f$; but it is not so easy to calculate these, or to explicitly identify $\pi_p$ from a list of them once you've done so. In my paper with Jared you can find details of a different approach, using Bushnell and Kutzko's theory of "types", which seems to work quite well.
These algorithms are implemented in recent versions of Magma (and should be in Sage fairly shortly as well, once someone gets around to reviewing my code).