First of all, start by ignoring all the answers here that talk about
depth of field. You are after background blur which, although somewhat
related, is really not the same thing as depth of field. Be aware
that most people mix this two notions.
The two main factors affecting background blur are:
1 – Framing
The tighter you frame (the bigger the subject in the viewfinder), the
more background blur you have. If you frame twice as tight you get double
the original background blur.
2 – Diameter of the entrance pupil
You get this by dividing the focal length by the F-number. For example,
a 85 mm f/1.4 (when used at 1.4) has a 61 mm entrance pupil (which is plenty).
The larger the entrance pupil, the more background blur. Double the diameter
and you get, again, twice the original background blur.
The distance to the background does not really matter as soon as it is
significantly larger than the distance to the subject. If this condition
is not met, then start worrying about depth of field. Other factors such
as focal length, subject distance, crop factor, etc... have no effect as
long as you compare pictures taken with the same framing and same
entrance pupil diameter.