tensor.unsqueeze_() adds a dimension of size one at the specified position.
If you pass the argument dim=0 to the function, it will add a new dimension at position 0.
Here is a smal example:
x = torch.randn(10, 10)
y = torch.unsqueeze(x, 0)
print(y.shape)
> torch.Size([1, 10, 10])

As you can see y now has an additional dimension.
You can also use the inplace method on x directly. Inplace methods are used with an underscore at the end of the function:
x = torch.randn(10, 10)
x.unsqueeze_(0)
print(x.shape)
> torch.Size([1, 10, 10])

In your example, you tried to feed a single image into your model.
The model (or Modules in general) need input with a batch dimension at position 0.
If you use a mini batch of images, it should work:
x = torch.randn(10, 3, 224, 224)
model = nn.Conv2d(3, 6, 3, 1, 1)
output = model(x)

However, if you just load a single image, you have to add the batch dimension, if it’s not already there.
Have a look at the following example:
x_single = torch.randn(3, 224, 224)
output = model(x_single) # RuntimeError

x_single.unsqueeze_(0)
print(x_single.shape)
output = model(x_single) # Works now!