There are 2 ways you can ask for gifts.
 
1) Free gift
To ask for a free gift from your neighbor, tap the menu button, then the "Gift" icon.

 
You can ask for an item from a neighbor by tapping on the "Ask" button. More items will be added here when you reach higher levels.
 
When you have tapped on the "Ask" button, the neighbor panel, as shown below, will display. Tap on the green '+' sign to move the player over to the selected list. Players who appear in the selected list will be sent the item request when you tap the green "Ask" button. You can use the search bar at the top to find a particular neighbor or use the 'select all' button to send the item request to all your neighbors. Tap the green "Ask" button to send the gift request to your neighbors.
 
After you have tapped on that button, a 'sent successfully' message will appear at the top of the panel.

Note: You can only request gifts once every 24 hours to each individual neighbor. The 24 hour limit starts from the moment a gift request is sent to a neighbor.
 
 
2) Asking for items to complete a building or machine
For some buildings and machines, you'll need to collect parts from your neighbors. You can also buy them with RC if you prefer. To request the items, tap on the incomplete machine to open the construction panel. An example is shown below.

 
If you don't want to use RC to purchase the parts required, select the "Ask" button and this will send an automatic message with your request to your chat with neighbors. After your neighbors have seen the message and sent you the items, you will be able to collect them from the tab My Posts in the chat (the lowest tab).