Hummmm.... well this will be a little bit hard to explain, but if you'll read what I'll link and write then you'll understand it.
You are a beginner, isn't it? :-)
everything to be in focus like you get on a kit lens (18-135 etc).
- First you must understand the basic notions about Depth of Field (DoF) and Aperture. If you already know these things, then you can skip to point 2. If not, read & study this link:
You did not mention what 50mm lens but from the 'mood' of your question and from the fact that you say 'a 50mm lens' I conclude that we speak about a variant of EF 50mm F/1.8 (or perhaps F/1.4?). This, combined with lens' focal length and with the fact that most probably you shoot in 'Full Auto'/Program mode means that most probably you have a (very) thin DoF (due of big apertures) which separates your "subject" (as you say) from the background.
OTOH, 18-135 has a much bigger DoF in Full Auto/Program mode(s) because its aperture varies from 3.5 to 5.6 (IIRC), thing which is combined with the corresponding focal length at each aperture value. That's why you see 'everything in focus' with the kit lens.
After you read (and understand) each points above, the solution is simple:
- Switch the camera to Av mode.
- Using the camera's main dial, set the aperture to the desired value in order to have everything in focus (F/11, 16, 22 - depending on your subject size and distance from it).
Hint: You need (a lot of) light and/or quality trade-of (due of High ISO) in order shoot with these apertures.