Yes, your phone needs to be unlocked - or locked to EE - in order to use an EE SIM card.
If you bought your phone outright from a retailer, it should already be unlocked and you have nothing to worry about.
However, if you're using an old phone that you got on a contract, it may be locked to your former network. In that case, you'll need to get it unlocked - but don't worry, as this is easy enough to do.
All you have to do is contact the network it's locked to, and they'll sort it out - sometimes free of charge. They may give you a code to enter, or might be able to it remotely. Your phone will be unlocked and ready for a new SIM in a few days' time.