2-stroke engines typically use 'mist lubrication' which involves mixing of lubricant oil with charge (air-fuel mixture). It can be achieved by adding the lubricant to the petrol tank or to have a oil pump which 'sprays' it in the charge.
Why mist lubrication is suitable for 2 stroke is illustrated by the animation below (Source Wikipedia)
As you can see, the charge travels everywhere - crank-case, ports and finally combustion chamber.
You are partially right in associating mist lubrication to the withdrawl of 2-strokes from the market (they were not banned but were simply not feasible emissions wise). Mist lubrication means the oil too burns along with the petrol. And this causes additional pollution. To counter this, you need costlier and more complex exhaust after-treatment which has successively made negative business cases for almost all 2-stroke models.
4-stroke has a different charge induction system comprising of valves and charge goes directly to the combustion chamber. So the lubrication is done on the other side of the piston by splashing oil from the sump by various methods. Most popular is the 'scoop' at the crank and con-rod joint.