That depends on what you mean by villain
If you meant the BBEG (Big Bad Evil Guy - the main Villain of the Campaign), I will start with some frame challenging:
A BBEG that is going to be defeated by level 1 characters is probably underwhelming. That's an animated armor or bugbear level of threat. Anything your players can beat with just their lvl 1 features and spells probably isn't going to be a Villain level of enemy.
So, just make usual encounters. If you don't know how, it's explained on p. 81 of DMG or p. 56 of the free DM's Basic Rules PDF. From my experience the difficulties are easier than what they say - deadly usually means having to spend some resources (class features and spell slots), but unless your players are unlucky, deadly shouldn't be actually deadly.
Let them get some levels. By level 3 to 5 they might be able to defeat something that actually could be called a BBEG.
However, you present the campaign villain early on
In the comments, goodguy5 suggested to introduce the Villain without combat. He gave two examples that you can read below, but I'll use the one from an official adventure - Strahd von Zarovich from CoS.
He is introduced almost as soon as the adventure starts, but he is only supposed to be fought by level 10+. He shows up in person some times, either to scare adventurers or to play them (or without them being the reason he shows up). If they engage combat against Strahd, he will charm them, make them fight each other and might try to turn one into a vampire, but he will not just kill them, because that would be unfun for him.
If you mean just a boss, not the big one
You can get some monsters, as the Bugbear mentioned, and give them some lore. If you can afford it, Lost Mines of Phandelver does exactly that and might teach you some things (the Starter Set is amazing for that).
Make the Animated Armor a guardian or a cursed soul. Make the Dryad corrupted by the destruction of a forest. Anyway, take CR 1 (at max CR 2) monsters and give them a background, a motivation, a story. That should be enough for 1st lvl.
If you want to create a new monster, p. 273 from DMG explains how to do it and calculate the CR in order to keep it balanced.
The DMG gives clear guidelines as to what is a balanced encounter to any party size and levels. You probably shouldn't have a BBEG that is defeatable by 1st level characters, but a "Boss" can be made taking usual CR1 monsters and giving them lore.
Quick note about similar-to-PC villains
AFAIK, there is no guideline to what CR a PC would be (they use CR = PC when needed, but this is just gross, if a CR1 monster is supposed to be a decent encounter against FOUR level 1 PCs, there is no way a level 1 PC is equivalent to a CR 1 monster). Without experience, you probably shouldn't try to make a PC-like villain, as it is easy to make it overpowered or underpowered.