This could mean big problems. A dirty engine is normal. What's not are signs of fresh, shiny oil or other wet spots. Exhaust Check the colour and amount of smoke coming from the exhaust pipe. The smoke should be barely visible or slightly white in appearance.
Blue smoke is bad news.
That's about as far as you can go to inspect the engine on your own unless you're knowledgeable about cars. If the car passes your road test and you are interested in buying it, you'll have to depend on your mechanic to check for leaks, malfunctions, damaged or worn-out parts, etc. Don't skimp on the time and attention you give to your test drive. Turn the radio off and keep conversation to a minimum so you can hear any noises the engine may make and remember them to describe to your mechanic later. If the seller is not amenable to a thorough road test, walk away.