You can change the mains with the engine in, but unless you know its just shells needed and there is not any damage to the crank then its not worth wuile.
You need to remove the sump, then the 5 mains bearing caps. Using something plastic that wont mark the journals, push the old shell out from 1 edge of the journal until its at least a quarter of the way round. Then use your fingers to slide it the rest of the way round the journal until it comes out. Fit the new one in the reverse way to removing it.
Make sure you keep the shells against the journals taking them out and putting them in, and dont be tempted to twist or pull them off it to make it easier to push in. Dip the new shells in engine oil before you try and slide them in as well.