In casinos, one professional dealer sits at every poker table and deals every hand--but even then, players take turns being "on the button," which means that they are treated like a dealer. This is a valuable position, because in most poker games, the dealer acts last, and therefore has the benefit of watching every other player act before making their own decision--and in poker, that information is king! This means that even if you only play at casinos, you should know how cards are dealt and handled, if only to ensure you make the most of being on the button yourself.
Always shuffle the cards thoroughly before dealing, even if another player claims to have shuffled them for you. The easiest way to shuffle is to cut the deck in two, lay both halves next to each other, and then riffle the corners so the two halves alternate into one another. Do this six or seven times, and you'll have a thoroughly shuffled deck.
Dealing is simple: deal one card at a time to each player at the table, starting with the player to your left, and then moving clockwise around the table until dealing a card to yourself. Repeat this, dealing one card at a time, until every player has as many cards as they need. Make a note of which cards are dealt down (hole cards in Hold'Em; First, Second, and Seventh Street in Seven-Card Stud) and which are dealt face up (Third, Fourth, Fifth, and Sixth Street in Seven-Card Stud).
The most important rule of dealing is to never expose cards that shouldn't be exposed. This means holding dealing cards low to the table, so other players can't peek, and this also means holding the deck so the bottom card isn't visible. If you really want to keep that bottom card hidden, you can get a cut card: a plastic cover held under the deck to keep that card covered. Professional casino dealers use these for exactly that reason.
In general, if you are dealing, it is considered polite to offer the deck to the player to your right to cut it: after shuffling, place the deck to your right, and that player can lift some of the cards off the top of the deck and move them towards you--it's a general rule that you should always cut towards the dealer. Then you can pick up the bottom portion of the deck and put it on top of the cut portion your opponent moved towards you. This ensures you haven't sneakily placed certain cards at the bottom of the deck.
You can decline to cut by tapping the top of the deck. But it's always polite to offer!
Discarded cards--such as folded hands or burn cards that are discarded in between rounds of betting--are all placed into the muck, the discard pile. As the dealer, manage the muck so it stays out of the pot, and to ensure no cards are exposed (or left for other players to peek at).
As the dealer, you're also in charge of the pot. In general, you don't need to overmanage the chips (especially if you're also an active player), but you can tidy it into stacks if you notice it's out of control. If a player asks for the size of the pot, it's usually up to the dealer to count it--so yes, you will have to do some math! You can also be in charge if a player needs to make change--but again, remember that if you're an active player, you might prefer to focus on your hand and let someone else handle that duty.
Mistakes happen, and cards can be accidentally exposed. It happens! If it's early in the deal--say only a few cards have been dealt--simply take the cards back, shuffle up, and redeal. This is a misdeal, and it's the easiest way to reset the hand to ensure no one is at a disadvantage. You might also consider declaring a misdeal if you realize you've missed a player.
But, occasionally, a card might get exposed late in a deal--say almost every player has their cards--and you don't want to restart. If this is the case, simply place the exposed card in the center of the board, announce it is out of play, and continue dealing. Leave the card exposed until the next round of betting, then add it to the muck.
Keep in mind different card rooms have different rules surrounding misdeals and exposed cards, and it's best to know those beforehand--you might end up losing position, or have to post a blind. So try to deal tidily!