Is this outlet wiring correct?
If the outlet tester said the outlet is not grounded, it is not wired properly.

The three black wires are not the problem. this is a common technique for bringing power to an outlet and then continuing the power down the line to other outlets or fixtures.

The connection between the outlet and the switch may be one of two things:
- if the switch is downstream (further away from the power source) the outlet is passing current to the switch and then on to a fixture.
- if the switch is upstream (between the outlet and the power source), the outlet, and everything else powered by the black wires shown, are controlled by that switch. It is not possible to tell from the wiring shown.

The white wires in the background may be correct, but it is hard to be sure from this picture.

The real problem is the lack of ground.  There should be a green or bare wire in the outlet box. This wire needs to be attached to the grounding screw of the outlet.  If it is already attached to something else in the box, you need to remove the grounding and attach two pigtails to that ground and then attach tem to the other grounded item and the outlet.

Given the information in your question, it sounds as if you have little experience in handling electricity.  It might be advisable to have this project done by someone with a bit more experience while you look on and become more familiar with power.

Above all, make sure that the power to all wires in the box is off (test with a non-contact tester) before attempting anything.