Let's start with a situation of perfect competition where you are a price taker. Then the demand you are facing in the market is a horizontal line$^1$ at the market price $P^*$. Your optimal quantity is the quantity $Q^*$ where $MC(Q^*)=P^*$ (and your MC curve is upward sloping). At that quantity your profit function has a maximum and is therefore locally flat. This means that if you slightly increase your quantity, your gain in revenue ($MR(Q^*)=P^*$) is just offset by your increase in costs ($MC(Q^*)=P^*$).
Now consider a deviation from perfect to imperfect competition, e.g. Cournot competition, where you have some market power. The demand you are facing is no longer horizontal but downward sloping. Therefore, at $Q^*$ your gain in revenue from a slight increase in quantity is now lower than before (since the price you achieve slightly falls), $MR_{new}(Q^*)<P^*$, whereas your marginal costs are still at $MC(Q^*)=P^*$.
Thus, your profit function is now locally decreasing at $Q^*$. This means that you can raise your profit by decreasing your quantity. Hence $Q^*_{new}<Q^*$. Since the same holds for the other firms in the market, all will decrease their production quantities and, accordingly, the market price will be higher than before, $P^*_{new}>P^*$.
$^1$ Strictly speaking, the demand you are facing cannot be described by a "demand curve" or a "demand function". It is zero for prices above the market price, jumps to infinity at the market price and stays there for prices below the market price, but let's call it "a horizontal line" as usual.