There are 28 total Heart Pieces in A Link Between Worlds. 14 of them are in Hyrule, and 14 of them are in Lorule. Here is a guide on how to obtain them all.
Hyrule
Heart Piece #1 - To find the first Heart Piece, go to Kakariko Village and go to the well. Pick up the rocks blocking the way and fall down the well. Follow the path inside the well to obtain the Heart Piece.

Heart Piece #2 - Go south of Kakariko Village and complete the Cucco dodging minigame to obtain another Heart Piece.

Heart Piece #3 - Go back into the Graveyard and go under the gravestone. You will see a Heart Piece on the ledge in the second room. Merge into the wall and cross over to get it.

Heart Piece #4 - Go back to the Blacksmith's House and merge into his wall. Go to the back of his house to find and obtain another Heart Piece.

Heart Piece #5 - Go into the Lost Woods from the northeast entrance/exit. Go to the southwest part of the woods and you will find a log with a small crack of land next to it. Merge into the wall and slip through the crack, and it will bring you to another Heart Piece.

Heart Piece #6 - Go to the east of Hyrule Castle and walk to the top corner. You will find the Heart Piece in between some rocks.

Heart Piece #7 - When you get to Zora's Domain, jump off the waterfall. You will be on another waterfall with a cave containing the next Heart Piece.

Heart Piece #8 - Go south of Kakariko Village and play the Rupee Rush minigame. Get at least 100 rupees to get another Heart Piece.

Heart Piece #9 - Go to the Tower of Hera and then go southwest. You will find a cave entrance down below. Merge into the wall and exit when you're above the entrance. Go into the entrance to get another Heart Piece.

Heart Piece #10 - Go south of Link's House and bomb the secret wall shown in the pic above. It will bring you to another Heart Piece.

Heart Piece #11 - Go to the Eastern Palace and look for the crumbled wall. Blow it up and go through to entrance to get inside a cave containing a Heart Piece. Merge into the wall and walk across to get the Heart Piece.

Heart Piece #12 - Go south of the Eastern Palace and look for some stakes in the ground. Use your Hammer to hammer them in and get the Heart Piece in the middle.

Heart Piece #13 - Go to the Tower of Hera and head into the cave entrance east of you. Fall down off the platforms. You'll eventually land on a giant platform with some enemies on it. Merge into the wall on your left and follow the path. You'll eventually reach another Heart Piece.

Heart Piece #14 - Complete the Racing minigame twice to get another Piece of Heart.
Lorule
Heart Piece #15 - Merge into the dimensional crack shown above to transfer to Hyrule and get another Heart Piece.

Heart Piece #16 - Go south of Skull Woods and you will find a house. Merge into the wall and walk to the southern end of the house to get another Heart Piece.

Heart Piece #17 - Go up to where Rosso's house would be if you were in Hyrule. Grab a Cucco from the mountainside then float onto his roof to get another Heart Piece.

Heart Piece #18 - Go to the Lottery minigame in Kakariko Village. One of the chests will have a Heart Piece inside of it.

Heart Piece #19 - Beat Rupee Rush with at least 150 rupees to get another Heart Piece.

Heart Piece #20 - Play the Octoball Derby minigame and score at least 100 points to get a Heart Piece.

Heart Piece #21 - Blow up the crumbling wall in the Graveyard as shown in the picture above. Merge into the wall and walk through the dimensional crack to end up in Hyrule. Go inside the cave that you have spawned next to to get another Heart Piece.

Heart Piece #22 - Go to the Dark Palace and balance on the beams. The Heart Piece will become in plain view. Balance yourself and get the Heart Piece.

Heart Piece #23 - Use a Bomb Flower on the crumbling wall east of Swamp Palace and go into the entrance to get another Heart Piece.

Heart Piece #24 - Follow the pathway to Rosso's Ore Mine in Hyrule, and whenever you see a dimensional crack, merge into the wall and walk through it. Now that you're in Lorule, go through the entrance shown in the picture above. Whenever you get to the big, central platform in the cave, head west. Use the Tornado Rod to reach higher platforms. Once you've gotten through, head out the exit. Merge into the statue and walk through the dimensional crack to transfer yourself to Hyrule and get another Piece of Heart.

Heart Piece #25 - Now that you're in Lorule, go to where the Tower of Hera would've been if you were in Hyrule. It has turned into the Treacherous Tower. Complete it on Normal Mode to obtain another Heart Piece.

Heart Piece #26 - Inside the first floor of Turtle Rock, go into the southwest area of the dungeon. Use the see-saw and step onto a warp tile. Use the Ice Rod to step on another warp tile. Walk out to the exit using your Ice Rod to find another Heart Piece.

Heart Piece #27 - Go near the Desert Palace. Go to the northeast corner. Time the bomb blast just right and throw it at the crumbling wall in front of you. Merge into the wall and cross through the dimensional crack to find another Heart Piece.

Heart Piece #28 - Go to the Blacksmith's House in Hyrule and pick up a large boulder and move it out of the way of an entrance to a cave. Go into the cave to get the last Heart Piece.